1
2
3
4
5
6
7
8
9
10
11
12
13
|
# encoding: UTF-8
# api: streamtuner2
# title: vTuner
# url: http://vtuner.com/
# description: Huge station list by music service provider
# version: 0.4
# type: channel
# category: radio
# config:
# { name: vtuner_pages, value: 1, type: int, description: "Number of pages to fetch." }
# { name: vtuner_order, value: POP, type: select, select: "POP=Popularity|AA=Alphabetically|HBR=Quality|RELI=Uptime|OP=Country", description: "Station sorting order." }
# priority: contrib
# png:
|
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
# encoding: UTF-8
# api: streamtuner2
# title: vTuner
# url: http://vtuner.com/
# description: Huge station list by music service provider
# version: 0.5
# type: channel
# category: radio
# config:
# { name: vtuner_pages, value: 1, type: int, description: "Number of pages to fetch." }
# { name: vtuner_order, value: POP, type: select, select: "POP=Popularity|AA=Alphabetically|HBR=Quality|RELI=Uptime|OP=Country", description: "Station sorting order." }
# priority: contrib
# png:
|
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
# cancel page scan if no further result links
if not re.search(r"""<A HREF="[^>]+&iCurrPage=%s">""" % (i + 1), html, re.I):
log.DATA("No further results at page %s" % i)
break
# crude <tr> extraction
rx_radio = re.compile(r"""
<a\s+href="\.\./func/dynampls.asp\?link=1&id=(\d+)">([^<>]+)</a>
.+? "middle">([^<>]+)</td>
.+? Category.+?>([^<>]+)</td>
.+? <td.+?>(\w+) (\d+)K</td>
""", re.X|re.S|re.I)
# assemble
for uu in rx_radio.findall(html):
|
|
|
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
# cancel page scan if no further result links
if not re.search(r"""<A HREF="[^>]+&iCurrPage=%s">""" % (i + 1), html, re.I):
log.DATA("No further results at page %s" % i)
break
# crude <tr> extraction
rx_radio = re.compile(r"""
<a\s+href="\.\./\w+/dynampls.asp\?id=(\d+)&k=\w+">([^<>]+)</a>
.+? "middle">([^<>]+)</td>
.+? Category.+?>([^<>]+)</td>
.+? <td.+?>(\w+) (\d+)K</td>
""", re.X|re.S|re.I)
# assemble
for uu in rx_radio.findall(html):
|