magnet-uri

Simple libtorrent Python client

时光总嘲笑我的痴心妄想 提交于 2021-02-08 10:17:37
问题 I tried creating a simple libtorrent python client (for magnet uri), and I failed, the program never continues past the "downloading metadata". If you may help me write a simple client it would be amazing. P.S. When I choose a save path, is the save path the folder which I want my data to be saved in? or the path for the data itself. (I used a code someone posted here) import libtorrent as lt import time ses = lt.session() ses.listen_on(6881, 6891) params = { 'save_path': '/home/downloads/',

Simple libtorrent Python client

假装没事ソ 提交于 2021-02-08 10:15:17
问题 I tried creating a simple libtorrent python client (for magnet uri), and I failed, the program never continues past the "downloading metadata". If you may help me write a simple client it would be amazing. P.S. When I choose a save path, is the save path the folder which I want my data to be saved in? or the path for the data itself. (I used a code someone posted here) import libtorrent as lt import time ses = lt.session() ses.listen_on(6881, 6891) params = { 'save_path': '/home/downloads/',

How PEX protocol (Magnetic links) finds it first IP?

纵饮孤独 提交于 2020-01-09 04:22:30
问题 I'm trying to understand how can a magnetic link work, as I've read they use DHT and PEX to get the peers, but if I'm a new node in the network how can I find peers with only the hash of the file?! Doesn't it always require a link to a known host? Thanks 回答1: The bittorrent DHT can be bootstrapped in many ways. It just needs the IP and Port of any other reachable DHT node out there. Current clients generally use several of the following strategies: bootstrap from a cache of long-lived nodes

libtorrent-rasterbar can't download metadata using magnet links

社会主义新天地 提交于 2020-01-04 15:57:32
问题 I'm trying to download a remote metadata file (.torrent) using no-DHT, tracker-only behavior with libtorrent-rasterbar 0.16.13. Unfortunately, I get a lot of peer_disconnected errors; seeding from my program and downloading through clients such as BT or QBittorrent works. I'm using hex-encoded hashes, I don't know if this is the problem as libtorrent-rasterbar seems to support both Hex and Base32 hashes in the Magnet URI. Remember that I already have a tracker and I dont want to use DHT, but

Given a .torrent file how do I generate a magnet link in python? [closed]

旧时模样 提交于 2019-12-28 05:10:52
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I need a way to convert .torrents into magnet links. Would like a way to do so in python. Are there any libraries that already do this? 回答1: You can do this with the bencode module, extracted from BitTorrent. To

Loading Magnet LINK using Rasterbar libtorrent in Python

与世无争的帅哥 提交于 2019-12-21 04:42:24
问题 How would one load a Magnet link via rasterbar libtorrent python binding? 回答1: import libtorrent as lt import time ses = lt.session() params = { 'save_path': '/home/downloads/'} link = "magnet:?xt=urn:btih:4MR6HU7SIHXAXQQFXFJTNLTYSREDR5EI&tr=http://tracker.vodo.net:6970/announce" handle = lt.add_magnet_uri(ses, link, params) print 'downloading metadata...' while (not handle.has_metadata()): time.sleep(1) print 'got metadata, starting torrent download...' while (handle.status().state != lt

How do BitTorrent magnet links work?

痞子三分冷 提交于 2019-12-17 07:59:32
问题 For the first time I used a magnet link. Curious about how it works, I looked up the specs and didn't find any answers. The wiki says xt means "exact topic" and is followed by the format ( btih in this case) with a SHA1 hash. I saw base32 mentioned, knowing it's 5 bits per character and 32 characters, I found it holds exactly 160bits, which is exactly the size of the SHA1. There's no room for an IP address or anything, it's just a SHA1. So how does the BitTorrent client find the actual file?

Open magnet link without losing focus

旧街凉风 提交于 2019-12-14 01:48:19
问题 Is there a way in javascript (or other) to handle a magnet link without the browser losing the focus? It'd be a little like opening a tab in the background without leaving the current page. 回答1: I recently had a similar problem, and was able to solve it by creating a named frame on the page and using it as the target for window.open : <iframe style="display:none" name="magnetframe"></iframe> window.open(magnet_uri, 'magnetframe') 回答2: another solution by using chrome API. chrome.tabs.update(

Check in browser is torrent-client installed

拥有回忆 提交于 2019-12-13 07:05:24
问题 Is there a way in javascript to check if magnet link is supported by browser (= to check if torrent client is installed on user's pc)? I want to check via javascript if browser opens torrent client by clicking on magnet link or I need to show some additional instructions (if torrent client is not installed). 回答1: Being a Browser, it has no access to installed applications in the OS, but what it does have is access to a list of supported MIME types. In JavaScript you can check it as follows:

Any way to verifiy a magnet link (Javascript)

本秂侑毒 提交于 2019-12-10 11:27:23
问题 Possibly an odd question, but I'm sure someone has thought of it before :) I'm wondering if it's at all possible to verify a given string as being a theoretically valid Magnet link, using JS. Not particularly bothered about opening the link etc. (That's done elsewhere), I'm more concerned here about weeding out broken/ truncated links. The best I can come up with from the top of my head is a simple beginning of string match for the magnet:?xt=urn: I suppose I could preface this with a length