Skip to content

Instantly share code, notes, and snippets.

@prongs
Created May 11, 2014 21:32
Show Gist options
  • Save prongs/80f029146869a7fa04c6 to your computer and use it in GitHub Desktop.
Save prongs/80f029146869a7fa04c6 to your computer and use it in GitHub Desktop.
gotDownloader.py
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