简体   繁体   中英

Python scraping of UDP bittorrent trackers

I am using Erin Drummond's python script for scraping bittorrent trackers ( https://github.com/erindru/m2t/blob/master/m2t/scraper.py ), but it appears I have an issue when scraping UDP trackers. The issue is that the "complete" number that is returned, is always 10 or lower. This doesn't seem very realistic to me, because as far as I know this is the number of times the tracker has registered a completed download of a torrent. I've tested with 100ds of infohashes to make sure it wasn't just a coincidence.

I have been tweaking the buffer size (4096 instead of 2048) and the socket timeout (10 instead of 8) for my local network, but other than that I didn't change anything. Does anyone have any suggestions what might cause incomplete "complete" numbers? Maybe the timeout is still too low?

The completed metric isn't mandatory for a functioning bittorrent network. Therefore a lot of clients, my own included may not implement it correctly. A completed peer is one that's defined as completing a torrent but not necessarily seeding. You may find the seeders value to be of more accurate, since those are peers that have the entire torrent.

Increasing the buffer size and timeout will have no effect. The entire response will fit within the given response buffer unless the number of info hashes scraped is very high. If the timeout is too short you simply won't receive a response at all.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM