Index: channels/internet_radio.py ================================================================== --- channels/internet_radio.py +++ channels/internet_radio.py @@ -1,11 +1,11 @@ # api: streamtuner2 # title: Internet-Radio # description: Broad list of webradios from all genres. # type: channel # category: radio -# version: 1.5 +# version: 1.6 # url: http://www.internet-radio.com/ # config: # { name: internetradio_max_pages, type: int, value: 5, category: limit, description: How many pages to fetch and read. } # priority: standard # png: @@ -111,11 +111,11 @@ html = "\n".join(html) # Break up into blocks before extracting bits rx_tr = re.compile("""]*>(.+?)""", re.S) rx_data = re.compile(r""" - playjp',\s*'(https?://[^'">]+) + \?server=(https?://[^'">]+) .*? ([^<>]+)([^<>]*) (?: .*? href="(.*?)" )? (?: .*? Genres:((?:]+>|\w+|\s+)+) )? .*? (\d+)\s*Listeners @@ -142,10 +142,50 @@ }) else: log.DATA("Regex couldn't decipher entry:", div) return r + """ + [HTML] + + + .pls + +
+ + .m3u + +
+ + + No Web Player + + + + + +
+ +

Radio Acacia

+
+ Nu Live Met Dj Joop En Dj Hansie veel luister plezier
+ http://www.radioacacia.nl + +
Genres: various nederlands piraat hollands piraten duits engels polka folk + + +

+ 82 Listeners
+ 192 Kbps
+

+

+

+

+ + + + """ # DOM traversing def with_dom(self, html_list): log.PROC("internet-radio, dom") rx_numbers = re.compile("(\d+)") @@ -162,13 +202,13 @@ bl = rx_numbers.findall(str(bl.text()) + " 0 0") else: bl = [0, 0] # stream url - url = dir.find("i").eq(0).parent().attr("onclick") + url = dir.find("a[onclick]").attr("onclick") if url: - url = re.search("(http://[^\'\"\>]+)", url) + url = re.search("(https?://[^\'\"\>]+)", url) if url: url = url.group(0) else: url = "" else: