Created
January 24, 2013 06:22
-
-
Save desg/4618102 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import time | |
def getReddit(subreddit): | |
baseurl = requests.get("http://reddit.com/r/%s/new/.json" % str(subreddit)) | |
jsonData = baseurl.json()['data']['children'] | |
return jsonData | |
known_title = "wheres waldo" | |
posts = 1 | |
seen_id = set() | |
while True: | |
reddit = getReddit('all') | |
for posts in range(0,3): | |
seen_id.add(reddit[posts]['data']['id']) | |
print seen_id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment