Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.64 KB | None | 0 0
  1. import praw
  2. from fnmatch import fnmatch, fnmatchcase
  3.  
  4. rbot = praw.Reddit(user_agent = 'starfoulah2097.tumblr.com',
  5.                     client_id = 'BqC_Qw_OQkFOQA',
  6.                     client_secret = '800XxEW6kQGz4aXMHot5d7vzN6k',
  7.                     username = 'the_reddit_bot',
  8.                     password = 'aqwzsx*')
  9.  
  10. domain_filter = ['i.*', 'self.*', 'imgur.*','youtube.*','youtu.*','reddit.*']
  11.  
  12. subreddit = rbot.subreddit(input("Please enter a subReddit to scrap : "))
  13. for submission in subreddit.new(limit = 100):
  14.     for check in domain_filter:
  15.         if not fnmatch(check, domain_filter):
  16.             print (submission.domain)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement