diff --git a/pirate-get.py b/pirate-get.py index 708d8d8..09acb82 100755 --- a/pirate-get.py +++ b/pirate-get.py @@ -1,7 +1,7 @@ #!/usr/bin/env python import webbrowser import urllib -import requests +import urllib2 import re import os from HTMLParser import HTMLParser @@ -67,7 +67,8 @@ def main(): # Catch the Ctrl-C exception and exit cleanly try: for page in xrange(pages): - res = requests.get(mirror + '/search/' + args.q.replace(" ", "+") + '/' + str(page) + '/7/0').text + f = urllib2.urlopen(mirror + '/search/' + args.q.replace(" ", "+") + '/' + str(page) + '/7/0') + res = f.read() found = re.findall(""""(magnet\:\?xt=[^"]*)|