arbitrage on amazon: exploiting the textbook trade-ins with python
TRANSCRIPT
Arbitrage on AmazonExploiting the Textbook Trade-ins with Python
@blorenz
Brandon Lorenz
Saturday, July 27, 13
@blorenz
Brandon Lorenz
★ Pythonista of two years
★ Djangonauting since 1.3
★ Web devving since `96★ SSI => Perl => PHP => Python
Hi, friends.
You should follow me [now!] on Twitter.
Why?
High tweet rate of Python relevance!
Saturday, July 27, 13
Amazon Trade-Ins
http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Dtextbooks-tradein
Saturday, July 27, 13
Chrome Web Inspector
• Inspect the DOM (Document Object Model)
• Test selectors
Saturday, July 27, 13
requests 1.2.3
What it is:
Simple-to-use HTTP abstraction
How we use it:
Requesting content to parse
Saturday, July 27, 13
pyquery 1.2.4
What it is:
jQuery-like abstraction of lxml
How we use it:
Traversing and extracting content
Saturday, July 27, 13
django 1.6b1
What it is:
Full-featured Python web-framework
How we use it:
Querying and rendering the data
Saturday, July 27, 13
Looking for PatternsURL Pattern!
http://www.amazon.com/gp/offer-listing/SOME_CHANGING_VALUE/ref=dp_olp_used?ie=UTF8&condition=used
The value of interest represents the Amazon product code.
We can programmatically create valid URLs based off the product code.
Saturday, July 27, 13
• Purchased and processed over $3,085.51 in books.
• Redeemed over $2,870.33 in purchases.
• $100 out-of-pocket initial investment.
• ~3-4 month activity window.
• Maintained and scraped 1.6 million books/day.
The Breakdown
Saturday, July 27, 13
On the GitHub
http://github.com/blorenz/textbook-arbitrage-redux
Saturday, July 27, 13
John Caserta, from The Noun Project
compose, arrange, from The Noun Project
Michael Rowe, from The Noun Project
Brexebrex, from The Noun Project
Image Attribution
Attribute asThe Noun Project
Saturday, July 27, 13