Giter Site home page Giter Site logo

magnet2torrent's Introduction

Magnet2Torrent

A command line tool that converts magnet links in to .torrent files.

This project is mostly abandoned. I will still merge most pull requests.

Requirements

  • python
  • python-libtorrent (libtorrent-rasterbar version 0.16 or later)

Install python-libtorrent on Ubuntu

sudo apt-get install python-libtorrent -y

Install python-libtorrent on macOS

brew install libtorrent-rasterbar --with-python

Install python-libtorrent on Fedora

sudo dnf install rb_libtorrent-python2

How to Use

python Magnet_To_Torrent2.py <magnet link> [torrent file]

Example

python Magnet_To_Torrent2.py -m "magnet:?xt=urn:btih:49fbd26322960d982da855c54e36df19ad3113b8&dn=ubuntu-12.04-desktop-i386.iso&tr=udp%3A%2F%2Ftracker.openbittorrent.com" -o ubunut12-04.iso

Licenses

All code is licensed under the GPL version 3

magnet2torrent's People

Contributors

aberaud avatar adeebnqo avatar chelmi98 avatar danfolkes avatar faless avatar fieu avatar hackergaucho avatar jarvvski avatar makefu avatar parnmatt avatar schleumer avatar scommab avatar valentt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

magnet2torrent's Issues

error running on ubuntu

python mag2tor.py "magnet:?xt=urn:btih:49fbd26322960d982da855c54e36df19ad3113b8&dn=ubuntu-12.04-desktop-i386.iso&tr=udp%3A%2F%2Ftracker.openbittorrent.com" ubunut12-04.iso
Downloading Metadata (this may take a while)
Done
Traceback (most recent call last):
File "mag2tor.py", line 113, in
main()
File "mag2tor.py", line 109, in main
magnet2torrent(magnet, output_name)
File "mag2tor.py", line 67, in magnet2torrent
torfile = lt.create_torrent(torinfo)
Boost.Python.ArgumentError: Python argument types in
create_torrent.init(create_torrent, torrent_info)
did not match C++ signature:
init(_object*, libtorrent::file_storage {lvalue} storage, int piece_size=0, int pad_file_limit=-1, int flags=1)
init(_object*, libtorrent::file_storage {lvalue})

Does not always create torrent with same info hash

The script isn't guaranteed to create a torrent with the same infohash as the original (meaning its a different swarm and doesn't work). Also, gives errors about 'storage_mode' parameter missing. And does not copy trackers from Magnet URI to the torrent file.

KeyError: 'unknown name in torrent params: paused'

Hello, i would like to fork this project and make a good user interface, but first, when i try it, using the command line example that you provide, i get this error:

Traceback (most recent call last):
  File "Magnet_To_Torrent2.py", line 144, in <module>
    main()
  File "Magnet_To_Torrent2.py", line 140, in main
    magnet2torrent(magnet, output_name)
  File "Magnet_To_Torrent2.py", line 51, in magnet2torrent
    handle = lt.add_magnet_uri(ses, magnet, params)
KeyError: 'unknown name in torrent params: paused'

Stuck on has_metadata

I strace the process and find it keep print info like below
futex(0x1c6e41c, FUTEX_WAIT_PRIVATE, 97, NULL) = -1 EAGAIN (Resource temporarily unavailable)
futex(0x1c6e3f0, FUTEX_WAKE_PRIVATE, 1) = 0
select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)

Do I need more settings or specific environment ? My test server is behind NAT

is this code still work

hey guy , i had download you pyton code. it always keep downloading.....but nerve never download any torrent file.

Latest libtorrent-rasterbar

I am running magnet2torrent with the following dependencies

  • python 3.5.2
  • libtorrent-rasterbar 1:1.1.1

I get the following error.

Traceback (most recent call last):
  File "/usr/bin/magnet2torrent", line 34, in <module>
    import libtorrent as lt
ImportError: /usr/lib/libboost_python.so.1.61.0: undefined symbol: PyClass_Type

This error occurs by updating to the latest version of libtorrent-rasterbar, which in turn needs boost-libs version 1.61.0.

By using the following dependency versions magnet2torrent runs successfully.

  • libtorrent-rasterbar-1:1.1
  • boost-libs-1.60.0

libtorrent what's wrong?

Traceback (most recent call last):
File "/usr/local/bin/Magnet_To_Torrent2.py", line 29, in
import libtorrent as lt
ImportError: /usr/lib64/python2.7/site-packages/libtorrent.so: undefined symbol: _ZTIN5boost6python15instance_holderE

system is fedora 25 x86_64

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.