Recently, I'm doing things related to magnet link. What I want to do is to convert a torrent file to magnet link.
I've tried given-a-torrent-file-how-do-i-generate-a-magnet-link-in-python, but get an error when issuing command metadata = bencode.bdecode(torrent)
:
"bencode.BTL.BTFailure: not a valid bencoded string"
Then I tried installing python-libtorrent
, but failed to finish the installation.
Is there a way to do it in Java? If not, how can this be easily done in Python, Thanks a lot!