import requests
from pprint import pprint
headers = {
'ris-zip': '22911',
'Accept-Encoding': 'gzip, deflate, sdch',
'Accept-Language': 'en-US,en;q=0.8',
'ris-chash': '30390833f3a0f4d1075f160ef72ca96f',
'ris-appsig': 'b2145d17b741043a60a5ef2c360f2dee',
'ris-email': '',
'Connection': 'keep-alive',
'ris-appts': '1435801132221',
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36',
'ris-price': '9.09',
'Accept': 'application/json, text/plain, */*',
'Referer': 'http://stores.barnesandnoble.com/ris/reservation.jsp?zipcode=22911&price=9.09&email=&chash=30390833f3a0f4d1075f160ef72ca96f&appid=bndotcom&appsig=b2145d17b741043a60a5ef2c360f2dee&ean=9780553418026&appts=1435801132221&',
'ris-ean': '9780553418026',
'ris-appid': 'bndotcom',
}
r = requests.get('http://stores.barnesandnoble.com/ris/inventory?ean=9780553418026&page=1&pageSize=5&zipcode=22911', headers=headers)
r = r.json()
pprint(r)
print(r['content']['stores'][0]['inventory'])
Created
July 3, 2015 19:24
-
-
Save jhwhite/3cfd02186e577db7a7e0 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello. Did you (or do you ever plan to) release the full code you're using at http://nyt-bestsellers-at-bn.herokuapp.com?