Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython

bliptv.reader is unavailable in PyPM, because there aren't any builds for it in the package repositories. Click the linked icons to find out why.

 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
1.0 Failed View build log
Windows (64-bit)
1.0 Failed View build log
Mac OS X (10.5+)
1.0 Failed View build log
Linux (32-bit)
1.0 Failed View build log
Linux (64-bit)
1.0 Failed View build log
 
Links
License
LGPL
Dependencies
Lastest release
version 1.0 on Jan 5th, 2011

The goal of this project is to give developers an easy way to access data stored on blip.tv, things like episodes, their enclosures and so on. It is a wrapper around the blip.tv API and encapsulates the formatting and parsing job.

Detailed Documentation

Installation

To install it, the best way is to use easy_install:

$ easy_install bliptv.reader

This will download the package and it's dependencies from PyPI. If you don't have easy_install installed, you can download it here:

http://peak.telecommunity.com/DevCenter/EasyInstall

Usage

First you need to import it:

>>> from bliptv.reader import Show

Now you can select a show and initialize it. We take COM.lounge TV as an example which can be found at http://comlounge.blip.tv. The showname thus is "comlounge":

>>> show = Show('comlounge')

We can now select the first page of episodes from it:

>>> page1 = show.episodes.pages[1]

We can also retrieve the next page like that:

>>> page2 = page1.next

And go back to page1 with prev:

>>> page1 = page2.prev

Unfortunately blip.tv does not return the overall amount of episodes so that we can only check next and prev if the return None like this:

>>> page1.prev is None

System Message: ERROR/3 (<string>, line 69)

Inconsistent literal block quoting.

True

Also note, that the list of episodes is backwards, starting with the most recent episode.

Now we can check the episodes in that page (we can only test existance here because we don't know the exact names of the episodes as these change all the time):

>>> episode = page1[0]
>>> len(episode.title)>0

System Message: ERROR/3 (<string>, line 79)

Inconsistent literal block quoting.

True

>>> episode.url.startswith("http://blip.tv/file")
True

Moreover you can access:

rating The rating of the show, e.g. TV-UN pureDescription A plain text version of the description description The HTML version of the description keywords The tags used as a list

Enclosures

One important part of course are the media files of an episode. These are stored as a dictionary inside the enclosures attribute of an episode:

>>> enclosures = episode.enclosures

The dict is a filetype => Enclosure structure:

>>> enclosure = enclosures['video/x-flv']
>>> enclosure.filetype

System Message: ERROR/3 (<string>, line 109)

Inconsistent literal block quoting.

'video/x-flv'

>>> enclosure.url.startswith('http://blip.tv/file/get/')
True
>>> enclosure.filesize>0
True
>>> enclosure.height>0
True
>>> enclosure.width>0
True

Subscribe to package updates

Last updated Jan 5th, 2011

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.