Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stefankoegl/bitlove-python
Python client for the bitlove.org API
https://github.com/stefankoegl/bitlove-python
Last synced: about 1 month ago
JSON representation
Python client for the bitlove.org API
- Host: GitHub
- URL: https://github.com/stefankoegl/bitlove-python
- Owner: stefankoegl
- License: gpl-3.0
- Created: 2012-08-31T08:11:11.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2012-09-06T19:27:58.000Z (over 12 years ago)
- Last Synced: 2024-12-02T23:42:22.646Z (about 1 month ago)
- Language: Python
- Size: 117 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
bitlove-python
==============A very simple client for the [bitlove.org API](https://bitlove.org/help/podcaster/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