Reddit API returning useless JSON
问题 I'm trying to scrape new stories from Reddit using their API and Python's urllib2, but I keep getting JSON documents like this one: { u'kind': u'Listing', u'data': { u'modhash': u'', u'children': [], u'after': None, u'before': None }} Here is my code: import json import time import urllib2 def get_submissions(after=None): url = 'http://reddit.com/r/all/new.json?limit=100' if after: url += '&after=%s' % after _user_agent = 'Reddit Link Analysis Bot by PirateLogic @ github.com/jamesbrewer'