Open zemendaniel opened 4 months ago
Okay, I'm dumb. Here is the solution: `import argparse import asyncio from torrentp import TorrentDownloader
parser = argparse.ArgumentParser() parser.add_argument("--hash", required=True, type=str) args = parser.parse_args()
torrent_file = TorrentDownloader(f"magnet:?xt=urn:btih:{args.hash}", '.') asyncio.run(torrent_file.start_download()) `
Hi, is the problem still persist?
Hi, thanks for the question, the issue has been resolved. I have left the solution in the comments.
Get Outlook for Androidhttps://aka.ms/AAb9ysg
From: Nima Akbarzadeh @.> Sent: Friday, July 12, 2024 4:28:47 PM To: iw4p/torrentp @.> Cc: Zemen Dániel @.>; Author @.> Subject: Re: [iw4p/torrentp] The torrents download really slowly! (Issue #24)
Hi, is the problem still persist?
— Reply to this email directly, view it on GitHubhttps://github.com/iw4p/torrentp/issues/24#issuecomment-2225705535, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A6JFG37QMA2NIXL2EKSPSWLZL7RZ7AVCNFSM6AAAAABKXRYW2GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRVG4YDKNJTGU. You are receiving this because you authored the thread.Message ID: @.***>
Good but I can not see the diff between two codes for impacting on the speed. Can you explain a little bit more how the second code has better speed for downloading torrent files?
@iw4p My downloader function wasnt async.
@iw4p sry for the late reply
Oh I see, I didn't realize that for the first time.
Np mate, love the library btw
Get Outlook for Androidhttps://aka.ms/AAb9ysg
From: Nima Akbarzadeh @.> Sent: Monday, July 15, 2024 12:53:47 PM To: iw4p/torrentp @.> Cc: Zemen Dániel @.>; Author @.> Subject: Re: [iw4p/torrentp] The torrents download really slowly! (Issue #24)
Oh I see, I didn't realize that for the first time.
— Reply to this email directly, view it on GitHubhttps://github.com/iw4p/torrentp/issues/24#issuecomment-2228219841, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A6JFG32SC22YHQTR37Y25M3ZMOS3XAVCNFSM6AAAAABKXRYW2GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRYGIYTSOBUGE. You are receiving this because you authored the thread.Message ID: @.***>
Hi, my problem is that the torrents download very slowly (a few kilobytes/s despite having a gigabit internet). I'm running ubuntu server btw. The command line version works perfectly tho, please help.