Limit number of links to 1000

This commit is contained in:
Péter Gombos 2013-10-17 14:51:39 +02:00
parent 015602ce22
commit 5c9e43aedf

View File

@ -5,7 +5,7 @@ import urllib2
import time
def load_json(subreddit):
req = urllib2.urlopen('http://www.reddit.com/r/' + subreddit + '.json')
req = urllib2.urlopen('http://www.reddit.com/r/' + subreddit + '.json?limit=1000')
json_string = json.load(req)
return json_string[u'data'][u'children']
@ -25,3 +25,4 @@ def load_subreddit():
urls = add_urls_to_list(load_subreddit())
print urls