Commit b9627da9 authored by prx's avatar prx

options pour python2

parent 3fd2cbc2
......@@ -558,9 +558,13 @@ class TorrentSearch:
leechs = str()
for i in soup.find_all('tbody'):
with ThreadPoolExecutor(max_workers=5) as executor:
for res in executor.map(torrent9_parse_results, i.find_all('td')):
yield res
if sys.version_info > (3, 0):
with ThreadPoolExecutor(max_workers=5) as executor:
for res in executor.map(torrent9_parse_results, i.find_all('td')):
yield res
else:
for z in i.find_all('td'):
yield(torrent9_parse_results(z))
def torrent9_parse_results(d):
baseurl = 'http://www.torrent9.ws'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment