Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import praw
- from fnmatch import fnmatch, fnmatchcase
- rbot = praw.Reddit(user_agent = 'starfoulah2097.tumblr.com',
- client_id = 'BqC_Qw_OQkFOQA',
- client_secret = '800XxEW6kQGz4aXMHot5d7vzN6k',
- username = 'the_reddit_bot',
- password = 'aqwzsx*')
- domain_filter = ['i.*', 'self.*', 'imgur.*','youtube.*','youtu.*','reddit.*']
- subreddit = rbot.subreddit(input("Please enter a subReddit to scrap : "))
- for submission in subreddit.new(limit = 100):
- for check in domain_filter:
- if not fnmatch(check, domain_filter):
- print (submission.domain)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement