Skip to content

Instantly share code, notes, and snippets.

@jrwren
Created September 14, 2012 01:50
Show Gist options
  • Select an option

  • Save jrwren/3719337 to your computer and use it in GitHub Desktop.

Select an option

Save jrwren/3719337 to your computer and use it in GitHub Desktop.
torrent announce urls
#!/usr/bin/env python
import sys
from deluge._libtorrent import lt
for a in sys.argv[1:]:
try:
info = lt.torrent_info(lt.bdecode(open(a).read()))
print("{0} {1}".format(info.name(), ', '.join((ae.url for ae in info.trackers()))))
except RuntimeError as e:
print("could not decode torrent file {0}".format(a))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment