Skip to content

Instantly share code, notes, and snippets.

@BernardOng
Created August 22, 2016 00:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BernardOng/7f766e33b3c094bf749858a4b643a99e to your computer and use it in GitHub Desktop.
Save BernardOng/7f766e33b3c094bf749858a4b643a99e to your computer and use it in GitHub Desktop.
def __iter__(self):
# Amazon Kindle results iterator
for i in range(1, self.maximum+1):
print 'Scraping and Processing: Page '+str(i)+' / '+str(self.maximum)
raw_html = self.retrieveSource(self.buildURL(self.query, i))
for j in self.processPage(raw_html):
yield j
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment