12. コード(一部) from mechanize import Browser from pyquery import PyQuery as pq br = Browser() br.set_handle_robots(False) br.addheaders = [('User-‐agent', 'Mozilla/5.0 (X11; U; Linux i686; en-‐US; rv:1.9.0.1) Gecko/2008071615 Fedora/3.0.1-‐1.fc9 Firefox/3.0.1')] br.open(amazon_url) br.select_form(name="sign_in") br["email"] = email br["password"] = password response = br.submit() d = pq(response.g
![エンジョイ☆スクレイピング](https://cdn-ak-scissors.b.st-hatena.com/image/square/fea86e2b3f9b4f68302e55a1150fbeed18cc597b/height=288;version=1;width=512/https%3A%2F%2Fcdn.slidesharecdn.com%2Fss_thumbnails%2Fshizuokapy20131116-131115223300-phpapp02-thumbnail.jpg%3Fwidth%3D640%26height%3D640%26fit%3Dbounds)