Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import urllib2
- import feedparser
- import ConfigParser
- class ThePirateBay():
- def __init__(self):
- pass
- def gather_info(self):
- cfg = ConfigParser.RawConfigParser(allow_no_value=True)
- cfg.readfp(open("config"))
- self.download_rss(cfg.get("feeds", "rss"))
- def get_stuff(self, data):
- for rel in data:
- t = rel['links'][0]['href']
- if "1080" in t:
- print t
- def download_rss(self, feed):
- temp = feedparser.parse(feed)['entries']
- self.get_stuff(temp)
- TPB = ThePirateBay()
- TPB.gather_info()
Add Comment
Please, Sign In to add comment