emjaytee404 / whatapi

What.cd Python API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

whatapi

This project is a simple wrapper around the What.cd AJAX API.

Example usage:

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

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.

About

What.cd Python API

License:Other


Languages

Language:Python 100.0%