Skip to main content

What.cd API

Project description

This project is a simple wrapper around the What.cd AJAX API. Also compatible with what-like trackers such as pth/apollo.

Available via PyPI via pip:

# pip install whatapi

Example usage:

>>> import whatapi
>>> apihandle = whatapi.WhatAPI(username='me', password='secret')
>>> apihandle.request("browse", searchstr="Talulah Gosh")
...
>>> apihandle.get_torrent(1234567)
...

To use another tracker:

>>> import whatapi
>>> apihandle = whatapi.WhatAPI(username='me', password='secret',
                                server='https://passtheheadphones.me')
>>> apihandle.request("browse", searchstr="The Beatles")
...

It’s strongly recommended that your script implements saving/loading session cookies to prevent overloading the server.

Example:

>>> import whatapi
>>> import cPickle as pickle
>>> cookies = pickle.load(open('cookies.dat', 'rb'))
>>> apihandle = whatapi.WhatAPI(username='me', password='me', cookies=cookies)
...
>>> pickle.dump(apihandle.session.cookies, open('cookies.dat', 'wb'))

API available at Gwindow’s API page or via the JSON API page on What.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

whatapi-0.2.0.tar.gz (3.6 kB view details)

Uploaded Source

File details

Details for the file whatapi-0.2.0.tar.gz.

File metadata

  • Download URL: whatapi-0.2.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for whatapi-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8832e01b77045875980c2e287394c3cd94eeae9939598d1c503aeb381f1833ff
MD5 c349e0f786111ce97b6983a3b6d0a437
BLAKE2b-256 f94008e77b05a110320933f234e65db1e50350692a21407125442f806dbfeb28

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page