libtorrent is a cross-platform library implementing the bittorrent protocol. It is written in C++ and is open source code. libtorrent bindings for other languages (notably Python) exist. Use this tag for any questions about the libtorrent library, irrespective of operating system or programming language.
Questions tagged [libtorrent]
227 questions
20
votes
4 answers
Libtorrent - Given a magnet link, how do you generate a torrent file?
I have read through the manual and I cannot find the answer. Given a magnet link I would like to generate a torrent file so that it can be loaded on the next startup to avoid redownloading the metadata. I have tried the fast resume feature, but I…

ciferkey
- 2,064
- 3
- 20
- 28
18
votes
1 answer
I can't download torrent from public tracker libtorrent
I'm using libtorrent module in python to download torrent. I can download torrent from a private tracker but not from a public one. I tried using various torrents, which I can download using "transmission". I checked it against 4 different…

Chaker
- 1,197
- 9
- 22
17
votes
3 answers
ModuleNotFoundError: No module named 'libtorrent'
I tried to run this below code in google colabratory:
!apt install python3-libtorrent
import libtorrent as lt
I was able to install python3-libtorrent. But am unable to import libtorrent. But the import attempt above gave a
ModuleNotFoundError: No…

Alsayer
- 171
- 1
- 1
- 5
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
9
votes
2 answers
python http/udp bittorrent tracker scrape library
I have a list of torrent info_hashes. For each info_hash, I have a list of trackers that correspond with that info_hash.
What I would like to do is scrape each tracker in the list to get the seeder/leecher/completed count. However, i'd rather not…

Erin Drummond
- 5,347
- 6
- 35
- 41
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
Torrent padding files
Did anyone created padding files for torrent?
How many clients use this stuff nowadays? Is "padding files" comprehensive?
I didn't found this feature in new clients such as ctorrent,ttorent, trasmission etc.
Do you have implementaions of this…

pic0
- 491
- 1
- 6
- 15
7
votes
0 answers
g++ linker unable to find winsock functions
I am using MinGW-w64 to link a torrent downloader but it doesn't work.
Does someone have an idea about what could be the problem?
g++.exe -o ./Debug/athorrentd @"athorrentd.txt" -lws2_32 -lwsock32 -lboost_program_options-mgw49-mt-1_58…

Athorcis
- 81
- 2
- 6
7
votes
1 answer
node-gyp build library dependencies
I want to find a way to simplify the installation of the Node.js "libtorrent" module.
My goal is to be able to provide pre-compiled .node files for each architectures, as this is done in the fibers module for example.
This way, the users can install…

Leeroy Brun
- 4,468
- 2
- 16
- 12
7
votes
7 answers
problems with ./configure for libtorrent on linux
Hell I have been having an extremely tough time installing libtorrent and am unsure what the problems are. I have seen plenty similar errors online but the solutions were not helpful and I am pretty sure the error message is just too vague for…

GreatGather
- 861
- 2
- 11
- 24
6
votes
1 answer
Create new torrent and seed
I'm using the following code to create a new torret and share but something is wrong because never seed.
import sys
import time
import libtorrent as lt
#Create torrent
fs = lt.file_storage()
lt.add_files(fs, "./test.txt")
t =…

user3782779
- 1,669
- 3
- 22
- 36
6
votes
1 answer
How to create/build/construct completely trackerless p2p(peer-to-peer)?
How can I create/build/construct completely trackerless p2p(peer-to-peer) distributed network architecture?
If i have seeds/peers with static ip address and seeds/peers in different WANs.
I read about BTS and DHT
also i found:
Torrent File…

Nurlan
- 673
- 4
- 18
5
votes
1 answer
Retrieve peers list without download the torrent using python-libtorrent
I search to retrieve the peer's IP of a torrent using libtorrent with Python. I try with the code :
import libtorrent as lt
import time
ses = lt.session()
ses.listen_on(6881, 6891)
info = lt.torrent_info('test.torrent')
h = ses.add_torrent({'ti':…

Comtention
- 123
- 3
- 9
5
votes
1 answer
VS2010 Unresolved External Symbol boost::asio::detail::winsock_init_base::throw_on_error when linking boost-system with a project using libtorrent
I'm trying to build a small command line BitTorrent client using Rasterbar's libtorrent, which depends on Boost. I've built both the Boost libraries and the libtorrent library using their respective directions, but when I try to build my project I…

Richard McDaniel
- 53
- 3
4
votes
1 answer
Install packages into virtual environment with apt-get
I'm trying to create a virtual environment for my Python3 project. The problem is, some of the dependencies I'm trying to install into the virtualenv aren't through pip. For example, to get LibTorrent, I had to run: $ sudo apt-get install…

Sam
- 2,172
- 3
- 24
- 43