Projects/pensieve
Projects
/
pensieve
Archived
3
0
Fork 0

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
1 changed files with 2 additions and 1 deletions

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