Baixe torrent em python usando torrentp

Baixe torrent em python usando torrentp

Estou tentando baixar torrent em python usando torrentp, mas ele tem dependências para libtorrent.

Tentei executar este código:

import asyncio
from torrentp import TorrentDownloader
torrent_file = TorrentDownloader("magnet:...", '.')
# Start the download process
asyncio.run(torrent_file.start_download()) # start_download() is a asynchronous method 

Mas estou recebendo este erro:

D:\Torrent\Media\Script>python torrent.py
Traceback (most recent call last):
  File "D:\Torrent\Media\Script\torrent.py", line 2, in <module>
    from torrentp import TorrentDownloader
  File "C:\Users\XXX\AppData\Local\Programs\Python\Python310\lib\site-packages\torrentp\__init__.py", line 6, in <module>
    from .torrent_downloader import TorrentDownloader
  File "C:\Users\XXX\AppData\Local\Programs\Python\Python310\lib\site-packages\torrentp\torrent_downloader.py", line 4, in <module>
    import libtorrent as lt
ImportError: DLL load failed while importing libtorrent: The specified module could not be found.

Eu li vários posts sobre libtorrent, mas até agora nada resolveu:

  1. Reinstalando o Microsoft Visual C++ Redistribuível
  2. Reinstale libtorrentetorrentp

Instalei o libtorrent usando pip install libtorrente pip install torrentp também tentei instalar os pacotes doGitHube fazer

python setup.py build

e

python setup.py install

mas estou entendendo isso:

error: [WinError 2] The system cannot find the file specified

tanto de buildquanto de install.

informação relacionada