January 2019
Beginner to intermediate
776 pages
19h 58m
English
We can use the bottlenose library that implements the Amazon's product search APIs.
Listing 7.6 gives the code for searching Amazon for books through product search APIs, as shown:
#!/usr/bin/env python # Python Network Programming Cookbook, Second Edition -- Chapter - 7 # This program is optimized for Python 2.7.12 and Python 3.5.2. # It may run on any other version with/without modifications. # Supply the Amazon Access and Secret Keys via local_settings.py import argparse import bottlenose from xml.dom import minidom as xml try: from local_settings import amazon_account except ImportError: pass ACCESS_KEY = amazon_account['access_key'] SECRET_KEY = amazon_account['secret_key'] AFFILIATE_ID = amazon_account['affiliate_id'] ...
Read now
Unlock full access