Hello. I have today what used to be mega-scraper.php but decided to bring it up to speed this afternoon for the first time. So what this does is scrapes all torrents (with or without metadata, even as little as only info_hash) using our database table of updated trackers for Feb 2020, and scrapes ALL torrents reported as 0 seeds (dead/DHT). I've tested this using a very basic magnet link with no appended trackers at all, converted to .torrent and tested on uTorrent, no trackers or any info at all. So I run the script and scrapes the same torrent not a problem!
This is great if your up against the DHT/PEX issue of no torrent stats from the swarm. This should resolve that, by relying on the info_hash to retrieve updated stats.
This script does need work, but I did make managing it much easier and joined two tables to work with the new tracker table.
TODO: Properly cycle through each tracker PER torrent ID, not just jump to next tracker on next torrent ID (doing the same thing again). This is the only limitation with the script as I am not as advanced as others.
I need people to test this out, report back and be sure to see the script options as well (I left them in for debug purposes).
Enjoy.
Proof of concept:
[URL unfurl="true"]https://www.switch-torrents.com/details/77/[/url]
The link above was (and still is) a dead torrent in terms of trackers. It was a very basic hash converted to .torrent and scraped. If you were to download this torrent, you would see no trackers in uTorrent.
Take care of magnet links
Open torrent-details.php and find this:
Replace with this:
Find this:
Replace with:
This is great if your up against the DHT/PEX issue of no torrent stats from the swarm. This should resolve that, by relying on the info_hash to retrieve updated stats.
This script does need work, but I did make managing it much easier and joined two tables to work with the new tracker table.
TODO: Properly cycle through each tracker PER torrent ID, not just jump to next tracker on next torrent ID (doing the same thing again). This is the only limitation with the script as I am not as advanced as others.
I need people to test this out, report back and be sure to see the script options as well (I left them in for debug purposes).
Enjoy.
Proof of concept:
[URL unfurl="true"]https://www.switch-torrents.com/details/77/[/url]
The link above was (and still is) a dead torrent in terms of trackers. It was a very basic hash converted to .torrent and scraped. If you were to download this torrent, you would see no trackers in uTorrent.
Take care of magnet links
Open torrent-details.php and find this:
print ("<a href=\"magnet:?xt=urn:btih:".$row["info_hash"]."&dn=".$row["filename"]."&tr=udp://tracker.openbittorrent.com&tr=udp://tracker.publicbt.com\"><button type='button' class='btn btn-large btn-primary'>Magnet Download</button></a>");
Replace with this:
print ("<a href=\"magnet:?xt=urn:btih:".$row["info_hash"]."&dn=".$row["filename"]."&tr=".$row["trackers_db"]."><button type='button' class='btn btn-large btn-primary'>Magnet Download</button></a>");
Find this:
$res = SQL_Query_exec("SELECT torrents.anon, torrents.seeders, torrents.banned, torrents.leechers, torrents.info_hash, torrents.filename, torrents.nfo, torrents.last_action, torrents.numratings, torrents.name, torrents.owner, torrents.save_as, torrents.descr, torrents.visible, torrents.size, torrents.added, torrents.views, torrents.hits, torrents.times_completed, torrents.id, torrents.type, torrents.external, torrents.image1, torrents.image2, torrents.tags, torrents.youtube, torrents.announce, torrents.numfiles, torrents.freeleech, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating, torrents.numratings, categories.name AS cat_name, torrentlang.name AS lang_name, torrentlang.image AS lang_image, categories.parent_cat as cat_parent, trackers.url as trackers_db, users.username, users.privacy, users.avatar FROM torrents LEFT JOIN categories ON torrents.category = categories.id LEFT JOIN torrentlang ON torrents.torrentlang = torrentlang.id LEFT JOIN users ON torrents.owner = users.id LEFT JOIN trackers ON trackers.url = trackers.url WHERE torrents.id = $id");
Replace with:
$res = SQL_Query_exec("SELECT torrents.anon, torrents.seeders, torrents.banned, torrents.leechers, torrents.info_hash, torrents.filename, torrents.nfo, torrents.last_action, torrents.numratings, torrents.name, torrents.owner, torrents.save_as, torrents.descr, torrents.visible, torrents.size, torrents.added, torrents.views, torrents.hits, torrents.times_completed, torrents.id, torrents.type, torrents.external, torrents.image1, torrents.image2, torrents.tags, torrents.youtube, torrents.announce, torrents.numfiles, torrents.freeleech, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating, torrents.numratings, categories.name AS cat_name, torrentlang.name AS lang_name, torrentlang.image AS lang_image, categories.parent_cat as cat_parent, trackers.url as trackers_db, users.username, users.privacy, users.avatar FROM torrents LEFT JOIN categories ON torrents.category = categories.id LEFT JOIN torrentlang ON torrents.torrentlang = torrentlang.id LEFT JOIN users ON torrents.owner = users.id LEFT JOIN trackers ON trackers.url = trackers.url WHERE torrents.id = $id");
