Skip to content

Instantly share code, notes, and snippets.

@chairco
Created April 11, 2016 13:22
Show Gist options
  • Save chairco/a514a17967b938ac3f8abfacdc8ad0ea to your computer and use it in GitHub Desktop.
Save chairco/a514a17967b938ac3f8abfacdc8ad0ea to your computer and use it in GitHub Desktop.
import requests
import pandas
import json
url = 'http://ecshweb.pchome.com.tw/search/v3.3/all/results?q=%E5%88%AE%E9%AC%8D%E5%88%80&page=2&sort=rnk/dc'
r = requests.get(url)
jd = json.loads(r.text)
df = pandas.DataFrame(jd['prods'])
print df.head()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment