Skip to content

Instantly share code, notes, and snippets.

@git2samus
Created May 14, 2015 03:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save git2samus/d9602b93bd1293d556fd to your computer and use it in GitHub Desktop.
Save git2samus/d9602b93bd1293d556fd to your computer and use it in GitHub Desktop.
get the list of default subreddits as a multisub
#!/usr/bin/env python3
import requests
default_json = requests.get('https://www.reddit.com/subreddits/default.json').json()
names = (child['data']['display_name'] for child in default_json['data']['children'])
print('http://www.reddit.com/r/{}'.format('+'.join(names)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment