Magnet is a URI scheme standard for Magnet links, which mainly refer to resources available for download via peer-to-peer networks.
Questions tagged [magnet-uri]
74 questions
203
votes
6 answers
How do BitTorrent magnet links work?
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,…
user34537
30
votes
1 answer
How to get the first peer from a torrent-magnet link?
I've been trying to understand the torrent-magnet technology, but I can't seem to figure out how you get connected to the first peer when opening a magnet link.
When you get a magnet link like below, it contains no initial peer - only the BitTorrent…

kba
- 19,333
- 5
- 62
- 89
22
votes
1 answer
How PEX protocol (Magnetic links) finds it first IP?
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…

Marco Martins
- 359
- 1
- 5
- 15
19
votes
1 answer
Given a .torrent file how do I generate a magnet link in python?
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?

Sebastian Sixx
- 203
- 1
- 2
- 4
17
votes
2 answers
Downloading a Torrent with libtorrent-python
I have the following python code:
import libtorrent as lt
import time
ses = lt.session()
ses.listen_on(6881, 6891)
params = {
'save_path': '/home/downloads/',
'storage_mode': lt.storage_mode_t(2),
'paused': False,
'auto_managed':…

cdecker
- 4,515
- 8
- 46
- 75
11
votes
0 answers
MonoTorrent magnet link download does not start
I strongly believe that MonoTorrent library can do this, but it is probably due to the lack of documentation that I haven't been able to get it working.
To start with, MonoTorrent seems to be able to successfully download original torrents by using…

zurfyx
- 31,043
- 20
- 111
- 145
8
votes
1 answer
creating daemon using Python libtorrent for fetching meta data of 100k+ torrents
I am trying to fetch meta data of around 10k+ torrents per day using python libtorrent.
This is the current flow of code
Start libtorrent Session.
Get total counts of torrents we need metadata for uploaded within last 1 day.
get torrent hashes from…
user1642018
7
votes
1 answer
Loading Magnet LINK using Rasterbar libtorrent in Python
How would one load a Magnet link via rasterbar libtorrent python binding?

Max
- 4,152
- 4
- 36
- 52
6
votes
2 answers
Resolve metadata of a torrent from the hash (or the magnet link)? Ideally in python
I'm trying to take a magnet link (ie. magnet:?xt=urn:btih:640FE84C613C17F663551D218689A64E8AEBEABE) and fetch the metadata for it (title, files, comment, whatever else comes with a .torrent file). Ideally in python, but I'll take any info I can get

Finn
- 364
- 5
- 10
5
votes
1 answer
Hash calculation in torrent clients
I was wondering if someone knows what a "hash" in a BitTorrent client is referring to, it is clearly not the hashcode of the file, but something different.
I think thats more a magnet link to a file, but how is this connected to the file itself?
I…

Emetiel
- 1,285
- 1
- 10
- 9
4
votes
4 answers
Any way to verifiy a magnet link (Javascript)
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.…

leezer3
- 280
- 4
- 10
4
votes
2 answers
MonoTorrent - Magnet link to Torrent file
Is there a way to generate .torrent file from a magnet link using the MonoTorrent .Net library? If so can someone explain with an example? I searched the site as well as googled but cant find a solution. if it is not possible are there any other…

user1715559
- 79
- 2
- 9
4
votes
1 answer
Generate a torrent/magnet link from a single file in a torrent collection
I was wondering if it is possible, having a torrent collection (IE a torrent containing multiple files) to extract a single one, generating an almost new torrent/magnet link to download only that single file but using the same source (announce,…

darioguarascio
- 1,077
- 11
- 15
3
votes
3 answers
perl regex matching infohash from magnet link
im trying to extract an info hash from a torrent magnet link using perls regex
the magnet link looks like:…

Kr0nZ
- 95
- 3
- 9
3
votes
2 answers
decoding magnet uri from coppersurfer.tk scrape file
i try to decode the hash to build magnet uri from scrape file (downloaded from coppersurfer.tk site)
after splitting the huge file
i try to decode the hash file
hash = hashlib.sha1(f).hexdigest() # hash info
and gotten list such…

Michelle Jun Lee
- 227
- 2
- 7
- 14