How to convert torrent info hash for scrape?
问题 I have a torrent hash from the magnet link. For example: fda164e7af470f83ea699a529845a9353cc26576 When I try to get information about leechers and peers I should request: http://tracker.publicbt.com/scrape?info_hash=??? How should I convert info hash for this request? Is it url encoding or becoding? how? In PHP. 回答1: It's a raw hexadecimal representation. Use pack() with H to convert it. Then URL encode it. 回答2: Got this python snippet from a colleague, r = '' s =