Skip to content

Instantly share code, notes, and snippets.

@sh-cho
Created October 15, 2017 14:28
Show Gist options
  • Save sh-cho/140d602d7cb2dc2a164f6b564e66dda0 to your computer and use it in GitHub Desktop.
Save sh-cho/140d602d7cb2dc2a164f6b564e66dda0 to your computer and use it in GitHub Desktop.
extract magnet address from torrent file in python 3
# python3
import magneturi
TORRENT_FILE_NAME = 'ubuntu-16.04.3-desktop-amd64.iso.torrent'
def main():
print(magneturi.from_torrent_file(TORRENT_FILE_NAME))
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment