How to Download Torrent Files - Python

iw4p

Nima Akbarzadeh

Posted on August 4, 2022

How to Download Torrent Files - Python

Image description
I searched a lot and I didn’t find anything EASY and FAST for downloading torrent files with python on Google colab. So I decided to start writing my own wrapped library for downloading torrent files.

TorrentP is a great and easy way to download torrent files, on your local machine or even google Colab!

Make sure you have Python installed, Then you can download it with this command on your terminal:

pip install torrentp After that you just have 3 steps:

Create a .py file
Copy and paste 3 lines
Run the script file and wait until it downloads completely!
If you have a torrent file use it like this:

from torrentp import TorrentDownloader
torrent_file = TorrentDownloader("test.torrent", '.')
torrent_file.start_download()

Enter fullscreen mode Exit fullscreen mode

You don’t have the torrent file? just a magnet link? no problem

from torrentp import TorrentDownloader
torrent_file = TorrentDownloader("magnet:...", '.')
torrent_file.start_download()

Enter fullscreen mode Exit fullscreen mode

It’s free and open source! you can fork and star it on Github if you enjoy it or if you like to add a new feature!

Project on GitHub: Github
PyPi Link: PyPi

Don’t forget to star it!

💖 💪 🙅 🚩
iw4p
Nima Akbarzadeh

Posted on August 4, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related