Diff
Differences From Artifact [b3964ae39a]:
- File channels/punkcast.py — part of check-in [9d6c4e81f8] at 2015-04-04 01:48:31 on branch trunk — Catch HTTP errors for reload_categories(). Provide a descriptive .placeholder[] and .empty_stub[] stream list for channels reloading. (user: mario, size: 3605) [annotate] [blame] [check-ins using]
To Artifact [eea2622232]:
- File channels/punkcast.py — part of check-in [85313637a3] at 2015-04-08 23:32:30 on branch action-mapfmts — Consolidate listformat types to just "pls", "m3u" and "srv". Probe for direct ICY server contact in action.playlist_convert(), unify extraction methods. (user: mario, size: 3584) [annotate] [blame] [check-ins using] [more...]
| ︙ | ︙ | |||
86 87 88 89 90 91 92 |
rx_sound = re.compile("""(http://[^"<>]+[.](mp3|ogg|m3u|pls|ram))""")
html = http.get(row["homepage"])
# look up ANY audio url
for uu in rx_sound.findall(html):
__print__( dbg.DATA, uu )
(url, fmt) = uu
| | | | 86 87 88 89 90 91 92 93 94 95 96 97 98 |
rx_sound = re.compile("""(http://[^"<>]+[.](mp3|ogg|m3u|pls|ram))""")
html = http.get(row["homepage"])
# look up ANY audio url
for uu in rx_sound.findall(html):
__print__( dbg.DATA, uu )
(url, fmt) = uu
action.play(url, self.mime_fmt(fmt), "srv")
return
# or just open webpage
action.browser(row["homepage"])
|