Skip to content
Python client for the bitlove.org API
Python
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.gitignore
AUTHORS
COPYING
README.md
bitlove.py
example.py
setup.py

README.md

bitlove-python

A very simple client for the bitlove.org API.

Usage

import bitlove

# your User-Agent string
MY_USER_AGENT = 'mycoolapp/1.0 (http://example.com)'

# some enclosure URLs of media files
urls = [
    'http://spaceboyz.net/~astro/bitlove-show/bl001-introduction.webm',
    'http://spaceboyz.net/~astro/bitlove-show/bl001-introduction.subs.mkv'
]

client = bitlove.BitloveClient(MY_USER_AGENT)
resp = client.get_by_enclosures(urls)

info0 = resp.get(urls[0])

# all available attributes of info0
print dir(info0)

# we use the first available source
source0 = info0.sources[0]

# and inspect its available attributes as well
print dir(source0)

# get the torrent URL
print source0.torrent
# http://bitlove.org/astro/bitlove-show/bl001-introduction.webm.torrent

# get the Flattr link
print source0.item_payment
# http://flattr.com/thing/662636/Torrent-for-BL001-Introduction-on-Bitlove

# get the title
print source0.item_title
# The Bitlove Home Show

# for the response format see https://bitlove.org/help/podcaster/api
Something went wrong with that request. Please try again.