Index: contrib/radiolist.py
==================================================================
--- contrib/radiolist.py
+++ contrib/radiolist.py
@@ -1,11 +1,11 @@
# encoding: UTF-8
# api: streamtuner2
# title: radiolist.net
-# description: Station list by continent+country
+# description: Station list by categories
# url: http://radiolist.net/
-# version: 0.5
+# version: 0.6
# type: channel
# category: radio
# priority: obsolete
# png:
# iVBORw0KGgoAAAANSUhEUgAAABgAAAAYBAMAAAASWSDLAAAAFVBMVEVKb61qibyDnMegs9S6yeDV4O37/vyx66abAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEwAACxMB
@@ -12,14 +12,14 @@
# AJqcGAAAAAd0SU1FB+ECDBAgLJqgZW4AAADoSURBVBjTNdBNj4MgEAbgqdLeZdo9C5NwFmo5Y7Wedauc1y/+/09YdLskkDwJmZl3IOxnON4A8frQhdc/7mG2cv3gx29X
# rdUfZuVHQ3JHEzZ7GSuNXxFV/FYYwryO6MOiZqEdnQPUC/fsXZaMuxa6MFfOVYN7kIWpHZClyJGLFjbbC617KaRUEJ4r4fU7IqNYrW5f2kgU5gZInG6MZ086eejcyIvO
# 1KwoLayoJjqnuWO5giW8msxVmBQXD5PttSlRm8TG2fDNZS3rRO/opeSCMnPa82xSmNgkfRxJ5yZxlPrPDmLu+7GqX4lERq4G0UEyAAAAAElFTkSuQmCC
# extraction-method: regex
#
-# Radio station list grouped by continents and countries.
+# ⚠ Requires a [Channel → Reload category tree] after updating.
#
-# NO LONGER LISTS STREAMING URLS (~ 2019), thus isn't interesting
-# enough anymore for extended support.
+# Radio station list, now categorized.
+# Search would be possible now, but isn't implemented.
import re
import action
import ahttp
@@ -27,72 +27,71 @@
from channels import *
# radiolist.net
#
-# · Groups stations by continents and countries.
-#
-# · Only fetches titles/homepages henceforth.
+# · Only fetches titles/urls.
#
class radiolist (ChannelPlugin):
# module attributes
- listformat = "href"
+ listformat = "pls"
has_search = False
- categories = ["Europe", "America", "Canada", "Australia"]
- catmap = {"Albania": "albania", "America": "us", "Andorra": "andorra", "Australia": "au", "Austria": "austria", "Belarus": "belarus", "Belgium": "belgium", "Bulgaria": "bulgaria", "Canada": "can", "Croatia": "croatia", "Denmark": "denmark", "Estonia": "estonia", "Europe": "", "Finland": "finland", "France": "france", "Germany": "germany", "Greece": "greece", "Hungary": "hungary", "Iceland": "iceland", "Ireland": "ireland", "Italy": "italy", "Latvia": "latvia", "Liechtenstein": "liechtenstein", "Lithuania": "lithuania", "Luxembourg": "luxembourg", "Macedonia": "macedonia", "Malta": "malta", "Moldova": "moldova", "Monaco": "monaco", "Montenegro": "montenegro", "Netherlands": "netherlands", "New Zealand": "nz", "Norway": "norway", "Poland": "poland", "Portugal": "portugal", "Romania": "romania", "Russia": "russia", "Serbia": "serbia", "Slovakia": "slovakia", "Slovenia": "slovenia", "South America": "sa", "Spain": "spain", "Sweden": "sweden", "Switzerland": "switzerland", "Ukraine": "ukraine"}
+ categories = []
+ catmap = []
titles = dict( genre="Genre", title="Station", playing="Location", bitrate="Bitrate", listeners=False )
+ # countries would still be available, but there seems to be no /country/ url map
+ """"""
+ """ """
+
# just a static list for now
def update_categories(self):
- self.catmap = {"Europe":"", "America":"us", "Canada":"ca", "Australia":"au", "New Zealand":"nz", "South America":"sa"}
- c = []#
- rx_links = re.compile(r"""
-
\s+
- \s+ ]*>\s*([\w\s-]+?)\s*<
- """, re.X|re.S)
- for title in self.catmap.keys():
+ c = []
+ rx_sel = re.compile(r"""