torrentp를 사용하여 Python에서 토렌트 다운로드

torrentp를 사용하여 Python에서 토렌트 다운로드

torrentp를 사용하여 Python에서 토렌트를 다운로드하려고 하는데 libtorrent.

이 코드를 실행해 보았습니다.

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 

하지만 다음 오류가 발생합니다.

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.

나는 여러 게시물을 읽었 libtorrent지만 지금까지 아무것도 해결하지 못했습니다.

  1. Microsoft Visual C++ 재배포 가능 패키지 재설치
  2. 다시 설치 libtorrent하고torrentp

다음을 사용하여 libtorrent를 설치했고 다음에서 패키지도 설치하려고 했습니다 pip install libtorrent.pip install torrentp깃허브그리고 할

python setup.py build

그리고

python setup.py install

하지만 나는 이것을 얻습니다 :

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

build와 에서 둘 다 install.

관련 정보