Check-in [0f7bc40c16]
Overview
Comment: | Optional plugin, retrieves raw Wiki content from Wiki.UbuntuUsers.de with country-grouped radio stations. (Will be bundled in another release.) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
0f7bc40c16d133a6e5133d1ff1414697 |
User & Date: | mario on 2015-04-12 18:02:09 |
Other Links: | manifest | tags |
Context
2015-04-13
| ||
00:32 | Remove default %m3u placeholders. (Now defaulting to PLS, as supported by pretty much all players.) check-in: 3dd41a0668 user: mario tags: trunk, 2.1.6 | |
2015-04-12
| ||
18:02 | Optional plugin, retrieves raw Wiki content from Wiki.UbuntuUsers.de with country-grouped radio stations. (Will be bundled in another release.) check-in: 0f7bc40c16 user: mario tags: trunk | |
16:40 | Prepare next beta release 2.1.6 check-in: ace13f842d user: mario tags: trunk | |
Changes
Added channels/ubuntuusers.py version [2d23392ed6].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | # encoding: UTF-8 # api: streamtuner2 # title: UbuntuUsers # description: Static list of radio stations courtesy of the UbuntuUsers.de Wiki # version: 0.1 # type: channel # category: radio # url: http://wiki.ubuntuusers.de/Internetradio/Stationen # png: # iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAACJVBMVEUAAACjeUWif2/CeiGhWTvUewuhQRjPeRCfRyK1hEeWYkynQkOJREW0Dw+TICC3DAyXRES3DAzXzMewhlOsahqtaxu3DAytaxu4DAytaxqtIiKqeTyaR0eokHKk # h2SjayikZhmdbC+SdVaXVz2fQhufQxyhaVGjjYKsdjS2jmXBUSS2UimUXUaybBXCRA+MPx+vbR2+RhWLSCuhe0vBiEGrZUiDX0+TREWzP0CgQ0R1RUWcHByqFBSDKCifFxesMDGKUVGfFxfIsqng3tvBhz+khmDLdxCYYiDLdxGaYyKfFxfLdxGaYyKfFhbMdxCZYiCfNTW6gHzEjki+fCqdeEifZ2eWKSmVGhqTMTGXaWexkWWrbR+rbB2og1Oo # mYbWfhDefwjQexHXRgnXRgrziAP/jQDvhAC7jV/YTBT3SAD3SADthAT5iADngAG8kmfRTBfxRADwRADEhjm4h0nGuay0fGW/YTnAZD21ODq6PT7BQ0S9QEG2OTq2PD3KBATSAADSAADRAADSAADSAADSAADNAwPUAADUAADPAwPPDA3QDg/QDxDNAwPVAADRAAC2SUmzjIWsf3CugXLVAADJAADBgH3Hm1/eiBveiBzVAADIAADAf3rMizb+iwD9 # iwDIAADAf3rMjDb8iwD7iwDNAwPVAADIAADAf3rMjDb7iwDOAwPXAADJAADBf3vMizb9iwD9jAC6EBC/CQm0ERLggArggAr///+cj9kUAAAAX3RSTlMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAZGJiK1ZiYlkJps315xim5xim5xh0+rQNdPq0DabnGKbnGKbnGOcY5xjnGKbnGKbnGKbN9ecYQGRiYitWYmJZCevlG38AAAABYktH # RLaqBwvxAAAAB3RJTUUH3wQMETciyGk1tQAAAHlJREFUGFd1jTESQUEQBbtnd+cXJxBwDiQSN3EwV5F+ZxC6hUAJlvIVJuya7ie48nWXOxVivtbRjaPRQWu6U4sBFaIMXSgGBEQ5Z2Zm1vr8qKaq9aXU/UT5avwCQG+E/gW0KWizheot39FUHT5Xjh5sBgjLbV9VT1ceE5sL4EiAe2YAAAAASUVORK5CYII= # config: - # priority: extra # # Short user-collected list of internet radio stations # on UbuntuUsers.de wiki. Only provides a single category, # but stations are grouped by country already. # import re from config import conf, dbg, __print__ from channels import * import ahttp # UU Wiki radio list class ubuntuusers (ChannelPlugin): # description module = "ubuntuusers" has_search = False listformat = "srv" titles = dict(playing=False, listeners=False, bitrate=False) base = "http://wiki.ubuntuusers.de/Internetradio/Stationen?action=export&format=raw" categories = ["stations"] # Nope def update_categories(self): pass # Fetches wiki page, extracts from raw markup. # Which has a coherent formatting of entries like: # # == Pi-Radio (Berlin) == # [http://www.piradio.de] {de} # {{{ # http://ice.rosebud-media.de:8000/88vier-ogg1.ogg # }}} # def update_streams(self, cat, search=None): # fetch page wiki = ahttp.get(self.base) # regexp lists out, just one srv url per entry ls = re.findall(r""" ^==\s*([\w\s.-]+)\s*==\s+ ^\[(http[^\s\]]+).*?\{(\w+)\}\s+ ^\{\{\{\s+ ^(http\S+) """, wiki, re.X|re.S|re.M) # pack into row list return [ dict(genre=g, title=t, url=u, homepage=h, bitrate=0, listeners=0) for t,h,g,u in ls ] |