
Originally Posted by
anthony-joal
Hi cloud 99,
Sure, a forgot about scrape, i'd be glad to add them, can you send on each client topic your scrape format (if you have it)? :)
Hi there,
I use a PHP-Torrent-Scraper scraper here: https://github.com/Edward-Stryfe/PHP-Torrent-Scraper to scrape HTTP trackers. This mainly limited to those sites which don't allow scraping at all or a limited number of times (to prevent server overload or faking to bypass minimum number of announces).
I mainly used this script to scrape data from trackers so that I can spoof some fake data more realistically without blowing my cover.
This is the code of the PHP script; I use to scrape data from certain trackers:
Code:
torrents = array();
foreach($infohash as $hash){
$ehash = pack('H*', $hash);
if (isset($arr_scrape_data['files'][$ehash])){
$torrents[$hash] = array('infohash'=>$hash,
'seeders'=>(int) $arr_scrape_data['files'][$ehash]['complete'],
'completed'=>(int) $arr_scrape_data['files'][$ehash]['downloaded'],
'leechers'=>(int) $arr_scrape_data['files'][$ehash]['incomplete']
);
} else {
$torrents[$hash] = false;
}
}
Something similar to this is what is expected. [Once again this format isn't mandatory, this is what I prefer, however, others may or may not agree and also once again they (the clients/trackers scraping algorithms) aren't similar].
Code:
Client.scrape({ announce: announceUrl, infoHash: [ infoHash1, infoHash2 ]}, function (err, results) {
results[infoHash1].announce
results[infoHash1].infoHash
results[infoHash1].name
results[infoHash1].complete
results[infoHash1].incomplete
results[infoHash1].downloaded
results[infoHash1].min_request_interval
Though I must say that each torrent client will have a different algorithm of presenting this data. Some may report certain parameters which are available for the other. Therefore the explorer [the one providing the information] would need to capture the scrape announce and check what are the parameters used.
After I had typed this entire conversation, I realized this isn't anywhere close to answering your question! I can provide you a scrape conversation format by Vuze. However, that has to be later on as I'm busy encoding some data right now.
Regards,
~cloud99
Bookmarks