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
75
76
77
78
79
80
81
82
83
84
85
86
87
|
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
75
76
77
78
79
80
81
82
83
|
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
+
-
+
-
+
-
+
+
+
|
# api: streamtuner2
# title: PunkCast
# description: Online video site that covered NYC artists. Not updated anymore.
# type: channel
# category: video
# version: 0.1
# version: 0.2
# url: http://www.punkcast.com/
# config: -
# priority: rare
# png:
# iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAyxJREFUOI0FwUlvG2UAgOH3++abxfsy2dtmcRsnghpBKyKhQA7lgsShPwEk/gVcKn4HN+6AynKIkEgFUkFF
# okrlpEkap2nqxHFsx/bYHs/m4XmE0s1Yyhjf8/niy6/49utv+PPf57x4sk3083cUzZgwZWElE9hL60yyc1zU39A8PsRxhijLMBFahO/5dFotwvGIeDxkOHJwNYvCwgyRYeElslTPu7ivTnFaTU6dkG4E
# ytANoskYgMb5W64b51jEuJ6Lq3Rmy2tEUcz1WR1pGGiyiIhMDOlQGHZRQRAQRR4CqJ2eUNvbJcAiEYz45NMtKrdvkc8a1G5M81e1RuiGjDpt1CTASKeQytDxowmmZdLpdDl8+QJLBqTxKSYkc0afbOyz
# OD/F/fIynhA0wwChazhIpOuNYCJI6hpxPOHiqk1K8+ldthDumFhXnLUHjEZj9DggKyWfbWywPpXHVqBEOKayXubDyl1qx0f0eh1E6GLaRX7aO8NLJjG9PvNLt0kpuJWeMHPTxnan6V81UWmpYacTVN57
# H9uewu01+OPJDle9AY//O+Dj++9yr3wHUnl8PyCTyzL2PE5aPUgYaFlNPDKigGe7VW6U1iDwcXuXzBbz+K5PThMEvQ6xjJjEAi2Z4Wn1mP03FyR1DaU0jUbnGj81IZXLkckoSpUV7JTB0HF4urvH3IMN
# jG6XbGGWemeAkc+hNEE0DtCSmngUCkFSixn321iWyVzGImEIVssllAh5e9kkCDV2T05pD4dMTeWpv6ohwghp6opCOOHh1kfcXZzm8S/bPNs/ZOC4mELj4eYGWiT54Z896qMJ9vws4XBE3lRIBeqmDmk/
# Qmnw+YNNlsur/PrbDqv5NFm7SHMwpNbuMggClmYL5JWkqytErKGPPVQmilhLSpbtBE1nxMFhjedHrymkNUrv3KHTuqLvjWl7MQevL+gNXaqNLlGzSyUvUVuEzMzkWVhZYqd6xPc//o6MBfWrAZcdBxnH
# zOcy/F1rsf3yFFmtEcWwOZ2h1R8hP5jATGmRQE+wXz0gjiMWihnO2z1qjS6ZQoF76yuU7DSxFFhJC10phmHIhVT8D1yefHn5PzXrAAAAAElFTkSuQmCC
# -off-config: { name: punkcast_img, type: boolean, value: 0, desciption: Load banners. (Channel > Update favicons) }
# priority: obsolete
#
#
# Disables itself per default.
# Punkcast is no longer updated. This plugin is kept for
# historic reasons. It was one of the default streamtuner1
# ST1 looked prettier with random images within.
#
# channels.
import re
import ahttp as http
from config import conf
import action
from channels import *
from config import __print__, dbg
# disable plugin per default
if "punkcast" not in vars(conf):
conf.plugins["punkcast"] = 0
# basic.ch broadcast archive
class punkcast (ChannelPlugin):
# description
title = "punkcast"
module = "punkcast"
homepage = "http://www.punkcast.com/"
# keeps category titles->urls
catmap = {}
categories = ["list"]
default = "list"
current = "list"
titles = dict(playing=False, listeners=False, bitrate=False, homepage=False)
# don't do anything
def update_categories(self):
pass
# get list
def update_streams(self, cat):
rx_link = re.compile("""
<a\shref="(http://punkcast.com/(\d+)/index.html)">
\s+<img[^>]+ALT="([^<">]+)"
.*? ALT="([^<">]+)"
""", re.S|re.X)
entries = []
#-- all from frontpage
html = http.get(self.homepage)
for uu in rx_link.findall(http.get(self.homepage)):
for uu in rx_link.findall(html):
(homepage, id, title) = uu
entries.append({
"genre": "?",
"genre": "%s" % id,
"title": title,
"playing": "PUNKCAST #"+id,
"playing": "PUNKCAST #%s" % id,
"format": "audio/mpeg",
"url": "none:",
"homepage": homepage,
"img": "http://punkcast.com/%s/PUNK%s.jpg" % (id, id),
})
# done
return entries
# special handler for play
|
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
91
92
93
94
95
96
97
98
|
-
+
-
-
-
-
-
-
|
__print__( dbg.DATA, uu )
(url, fmt) = uu
action.action.play(url, self.mime_fmt(fmt), "url/direct")
return
# or just open webpage
action.action.browser(row["homepage"])
|