Logging into Amazon with Python
Click here for more recommended reading on Python and open source programming Recently, I was asked to show someone how to programmatically log in to Amazon using the Python requests package (unlike using selenium / mechanize etc.). I thought I’d share how to do this as a blog post. Step 1) First, we'll load the packages we’ll need. In our example, we’ll just be using requests and BeautifulSoup. For more information about either of these packages, see here for a refresher on requests, or here for more about BeautifulSoup. [code lang="python"] '''load packages''' import requests from bs4 import BeautifulSoup [/code] Step 2) Next, we create a session object. Basically, a session allows you to maintain a connection to a website, while also maintaining cookies. Once you’ve logged into Amazon, this…