Closed ChrisTimperley closed 7 years ago
There are a few tpb mirrors that don't have the magnet URI in the search results: the magnet icon is just a link to the torrent page (no idea why they are doing this).
This breaks pirate-get entirely: the exception could be handled but it's not recoverable anyway so we opted to blacklist these sites. We could in theory make another HTTP request and fetch the magnet but this will make the search way slower, especially if you get a lot of results.
So piratebaymirror.eu
should be added to pirate/data/blacklist.json
Ah, I see. That makes sense. Thanks for the quick reply! Maybe add an exception to check for the magnet link and just print "incompatible proxy detected"? Also, could the tool potentially go and fetch a (whitelisted) proxy automatically? (maybe using https://thepiratebay-proxylist.org/api/v1/proxies).
Edit: I switched over to https://pirateproxy.red and now it works a treat! :+1:
The would be the best thing to do but it would also make testing the mirrors slower: pirate-get would have to make a search with a fixed term and check that the magnets are present.
I didn't know about this api: it could indeed be used here.
Anyway, if you need to use another proxy you can set pirate-get to use your own list of mirrors with --mirror
option or in the config file.
I close this since it seems you have solved and I updated the blacklist.
This looks like a sweet tool, but I'm having a few problems trying to connect to TPB. I've tried various proxies in the config file, all to no avail. I get the following error upon connecting.
Running Elementary 0.4 (Loki) and Python 3.5.
Update: appears to be fetching and parsing the HTML for a given page correctly. Problem is encountered somewhere in the
row.find(...)
command. Adding a simpleprint(row)
at torrent.py:106 yields:In the example above, the magnet link begins with "/torrent", rather than "magnet". Perhaps this line needs to be changed to reflect a change in the HTML output?
Update 2: after modifying torrent.py:106 to reflect this change...
we successfully connect to the proxy, but fail at print.py:65
Update 3: The bug is still at torrent.py:106, and stems from a change in the reporting of magnet links. Now the link takes you to the HTML page for that particular torrent, rather than giving you a nice magnet link. You could add another step to go and fetch the magnet link from that URL (but that's adding another HTTP request per entry, which isn't going to be nice).