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