Skip to content

Instantly share code, notes, and snippets.

@bcse
Created January 29, 2011 21:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bcse/802235 to your computer and use it in GitHub Desktop.
Save bcse/802235 to your computer and use it in GitHub Desktop.
streamlined zoink.it + torrific (Depends on suds and Python 2.5 or higher)
from os.path import expanduser, join
from base64 import b64encode
from glob import glob
import webbrowser
from suds.client import Client
url = 'https://zoink.it/api/torrage.wsdl'
client = Client(url)
files = glob(join(expanduser('~'), 'Downloads', '*.torrent'))
for file in files:
with open(file, 'rb') as f:
infohash = client.service.cacheTorrent(b64encode(f.read()))
webbrowser.open_new_tab(r'http://torrific.com/zoink.it/torrent/%s.torrent' % infohash)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment