Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2016
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. import pytrends
  2. from pytrends.request import TrendReq
  3. import json
  4. from pprint import pprint
  5.  
  6. username = ''#raw_input('Username: ')
  7. password = ''
  8.  
  9. pytrends = TrendReq(username, password, custom_useragent=None)
  10. topthirty = pytrends.top30in30()
  11.  
  12. #print json.dumps(topthirty)
  13. """
  14. with open('jsondump.json', 'w') as f:
  15. f.write(json.dumps(topthirty))
  16. """
  17. with open('jsondump.json') as r:
  18. z = json.load(r)
  19. print z['weeksList'][1]#[20160923]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement