28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# → AccuRadio
# → BBC
#
# In this module only iTunes will be queried for now.
#
import re
from config import conf, dbg, __print__
from channels import *
import ahttp as http
# Surfmusik sharing site
class itunes (ChannelPlugin):
|
|
|
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# → AccuRadio
# → BBC
#
# In this module only iTunes will be queried for now.
#
import re
from config import *
from channels import *
import ahttp as http
# Surfmusik sharing site
class itunes (ChannelPlugin):
|
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
pass
# Just copy over stream URLs and station titles
def update_streams(self, cat):
m3u = http.get(self.base, {"category": cat.lower()})
if len(m3u) < 256:
__print__(dbg.ERR, m3u)
rx_m3u = re.compile(r"""
^File(\d+)\s*=\s*(http://[^\s]+)\s*$\s*
^Title\1\s*=\s*([^\r\n]+)\s*$\s*
""", re.M|re.I|re.X)
r = []
|
|
|
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
pass
# Just copy over stream URLs and station titles
def update_streams(self, cat):
m3u = http.get(self.base, {"category": cat.lower()})
if len(m3u) < 256:
log.ERR(m3u)
rx_m3u = re.compile(r"""
^File(\d+)\s*=\s*(http://[^\s]+)\s*$\s*
^Title\1\s*=\s*([^\r\n]+)\s*$\s*
""", re.M|re.I|re.X)
r = []
|