Guest User

Untitled

a guest
Nov 25th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. import urllib2
  2. import feedparser
  3. import ConfigParser
  4.  
  5. class ThePirateBay():
  6. def __init__(self):
  7. pass
  8.  
  9. def gather_info(self):
  10. cfg = ConfigParser.RawConfigParser(allow_no_value=True)
  11. cfg.readfp(open("config"))
  12. self.download_rss(cfg.get("feeds", "rss"))
  13.  
  14. def get_stuff(self, data):
  15. for rel in data:
  16. t = rel['links'][0]['href']
  17. if "1080" in t:
  18. print t
  19.  
  20.  
  21. def download_rss(self, feed):
  22. temp = feedparser.parse(feed)['entries']
  23. self.get_stuff(temp)
  24.  
  25.  
  26.  
  27.  
  28. TPB = ThePirateBay()
  29. TPB.gather_info()
Add Comment
Please, Sign In to add comment