coherence.backends.lolcats_storage (module)

LolcatsStore

This is a Media Backend that allows you to access the cool and cute pictures from lolcats.com.

class LolCatsImage(parent_id, item_id, urlbase, **kwargs)[source]

Bases: coherence.backends.models.items.BackendImageItem

LolCatsImage represents the description for our items which will be images, it inherits from BackendImageItem.

Changed in version 0.8.3: Class has been renamed into camel-case format Refactored using the class BackendImageItem

mimetype = 'image/jpeg'
class LolcatsStore(server, *args, **kwargs)[source]

Bases: coherence.backends.models.stores.BackendImageStore

The media server for Lolcats.com.

Changed in version 0.8.3: Refactored using the class BackendVideoStore

logCategory = 'lolcats'
implements = ['MediaServer']
upnp_protocols = ['http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_TN;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=00f00000000000000000000000000000', 'http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=00f00000000000000000000000000000', 'http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_MED;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=00f00000000000000000000000000000', 'http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_LRG;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=00f00000000000000000000000000000', 'http-get:*:image/jpeg:*']
root_url = b'https://icanhas.cheezburger.com/lolcats/rss'
root_find_items = './channel/item'
root_id = 0
item_cls

alias of LolCatsImage

item_type = 'http-get:*:image/jpeg:*'
last_updated = ''
parse_data(root)[source]

Iterate over all items found inside the provided tree and parse each one of them.

parse_item(item)[source]

Convenient method to extract data from an item.

Warning

this method must be sub classed and must return a dictionary which should hold the data that you want to be set for your items.