1
2
3
4
5
6
7
8
9
10
11
12
13
|
# encoding: UTF-8
# api: streamtuner2
# title: Liveradio.ie
# description: Irish/worldwide radio station directory
# url: http://liveradio.ie/
# version: 0.2
# type: channel
# category: radio
# config: -
# png:
# iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABB0lEQVR4nLWTQUpDMRCGv0lregDBI3gAfW/hRrp8ZOMh5PUMXkFcu7EbTxHd
# CC4EhfQkQg/QR5txYQqvMdVHwdnMZJj555uQwH+YurpaNZUOqTWl5i5qGIusDxIAZgBGuBhCsiOgrq7WUa+tkReAjepHystQgmn8zt0As40y
# skYa4HwfSS5w2otd8svtWurqHyvnCZcXAHRRW7v8nANnq6bSPk0ucFQS+M3G2fkduMqLrJF5d3zSTnyYATsXmhO89WLfix8A1NWjvwhek5+m
|
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
# encoding: UTF-8
# api: streamtuner2
# title: Liveradio.ie
# description: Irish/worldwide radio station directory
# url: http://liveradio.ie/
# version: 0.3
# type: channel
# category: radio
# config: -
# png:
# iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABB0lEQVR4nLWTQUpDMRCGv0lregDBI3gAfW/hRrp8ZOMh5PUMXkFcu7EbTxHd
# CC4EhfQkQg/QR5txYQqvMdVHwdnMZJj555uQwH+YurpaNZUOqTWl5i5qGIusDxIAZgBGuBhCsiOgrq7WUa+tkReAjepHystQgmn8zt0As40y
# skYa4HwfSS5w2otd8svtWurqHyvnCZcXAHRRW7v8nANnq6bSPk0ucFQS+M3G2fkduMqLrJF5d3zSTnyYATsXmhO89WLfix8A1NWjvwhek5+m
|
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
# ยท title and genre available right away
# ยท img url is embedded
# ยท keep station ID as `urn:liveradion:12345`
#
r = []
ls = re.findall("""
itemtype="http://schema.org/RadioStation"> .*?
href="/stations/([\w-]+) .*?
<img\s+src="/(files/images/[^"]+)" .*?
="country">([^<]+)< .*?
itemprop="name"><a[^>]+>([^<]+)</a> .*?
class="genre">([^<]+)<
""", html, re.X|re.S)
for row in ls:
log.DATA(row)
|
|
|
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
# ยท title and genre available right away
# ยท img url is embedded
# ยท keep station ID as `urn:liveradion:12345`
#
r = []
ls = re.findall("""
itemtype="http://schema.org/RadioStation"> .*?
href="(?:https?://www.liveradio.ie)?/stations/([\w-]+) .*?
<img\s+src="/(files/images/[^"]+)" .*?
="country">([^<]+)< .*?
itemprop="name"><a[^>]+>([^<]+)</a> .*?
class="genre">([^<]+)<
""", html, re.X|re.S)
for row in ls:
log.DATA(row)
|