Created
May 11, 2014 21:32
-
-
Save prongs/80f029146869a7fa04c6 to your computer and use it in GitHub Desktop.
gotDownloader.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup as bs | |
from StringIO import StringIO | |
import gzip | |
import urllib2 | |
import os | |
s = bs(gzip.GzipFile(fileobj=StringIO(urllib2.urlopen("http://kickass.to/search/game%20of%20thrones/?from=opensearch").read())).read()) | |
magnet = s.find_all('table')[1].find_all('tr')[1].find_all('a')[3]['href'] | |
os.system('start "" "%s"' % magnet) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment