How it works...

This recipe uses a third-party module, requests. It has convenient wrapper methods, get() and post(), which do the URL encoding of data and submit forms properly.

In this recipe, we created a data payload with a USERNAME, PASSWORD, and EMAIL for creating the Twitter account. When we first submit the form with the GET method, the Twitter website returns an error saying that the page only supports POST. After we submit the data with POST, the page processes it. We can confirm this from the header data.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.249.198