65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
html = http.get(self.homepage)
rx = re.compile("""<option[^>]+value="/stations/[-+&.\w\s%]+/">([^<]+)</option>""")
self.categories = rx.findall(html)
# fetch station lists
def update_streams(self, cat, force=0):
entries = []
if cat not in self.categories:
return []
rx_pages = re.compile('href="/stations/[-+\w%\d\s]+/page(\d+)">\d+</a>')
|
|
|
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
html = http.get(self.homepage)
rx = re.compile("""<option[^>]+value="/stations/[-+&.\w\s%]+/">([^<]+)</option>""")
self.categories = rx.findall(html)
# fetch station lists
def update_streams(self, cat):
entries = []
if cat not in self.categories:
return []
rx_pages = re.compile('href="/stations/[-+\w%\d\s]+/page(\d+)">\d+</a>')
|