Internet radio browser GUI for music/video streams from various directory services.

⌈⌋ ⎇ branch:  streamtuner2


Check-in [fd54f9f9a7]

Overview
Comment:rcast: updated for current HTML
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: fd54f9f9a741d87faf15a840af9561878d3ad8f4
User & Date: mario on 2022-02-20 06:31:49
Other Links: manifest | tags
Context
2022-02-21
08:03
Add podcast option check-in: 30d8e52a56 user: mario tags: trunk
2022-02-20
06:31
rcast: updated for current HTML check-in: fd54f9f9a7 user: mario tags: trunk
05:57
filtermusic: update for current station list HTML, add favicons + homepages check-in: ce7292f416 user: mario tags: trunk
Changes

Modified contrib/rcast.py from [1b543a00d6] to [6f63f31e2b].


1
2
3
4
5
6

7
8
9
10
11
12
13
1
2
3
4
5
6

7
8
9
10
11
12
13
14
+





-
+







# encoding: utf-8
# api: streamtuner2
# title: RCast
# description: Streaming server provider and station directory
# type: channel
# category: radio
# version: 0.2
# version: 0.3
# url: http://www.rcast.net/dir
# png: 
#    iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABH0lEQVR42mPgZWXkNxdhsScH87Iw8DOAGHcDBf6Tg02FmW1RDPj97cvf/0BwJ4D/HyHNGAbc9uUBawaBf0BASDOGASBNIM1fHt34BaKRFd4CGg4C
#    eA0Agd9fPv255c39F90AXC6DG3ArSOwP1O9wDTc92cA23gqR/g3i3yvz/IFuMNgAeyBANx0Enk7M+Qlig5wO0wgCt1yZwepuBQj8sQUCsAG/3r74g+7k318//oWxYYaDwM/3r//A2GADsKUDGICxH7XG/wK75s8f
#    cEB/vnwU7C2MdADDn2+d+4VsADCKIc72ZPsHM/zvn99/cRpw050Z7O+nvVkYUfpmx4KfMDGcBiB7A90AZIzXgJ9vX4D9eceP9x9ZBhCDwQZQmp0BVv4354bQNGwAAAAASUVORK5CYII=
# priority: extra
# extraction-method: regex
60
61
62
63
64
65
66
67
68
69
70




71
72
73
74
75
76
77
78
79
80
81
82
83
84

85
86

87
88
89
90
91
92
93
61
62
63
64
65
66
67




68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84

85
86

87
88
89
90
91
92
93
94







-
-
-
-
+
+
+
+













-
+

-
+







                break

        # extract
        ls = re.findall("""
           <tr> .*?
           <audio\s+id="jp_audio_(\d+)" .*? src="([^"]+?);?"> .*?
           <h4.*?>([^<>]+)</a></h4> .*?
           <b>([^<>]*)</b> .*?
           <b\s+class[^>]+>([^<>]*)</b> .*?
           Genre:(.+?)</td> .*?
           </i>\s*(\d+)\s*Kbps<br>\s*(audio/[\w.-]+)
           <b\\b[^>]*>([^<>]*)</b> .*?
           <small\s+class[^>]+>([^<>]*)</small> .*?
           Genres?:(.+?)<br> .*?
           <p[^>]*>\s*(\d+)\s*Kbps
        """, html, re.X|re.S)
        #log.DATA(re.findall("(<audio.*?>)", html))
        
        # blocks
        for row in ls:
            try:
                log.UI(row)
                r.append(dict(
                    id = row[0],
                    url = row[1],
                    title = unhtml(row[2]),
                    playing = unhtml(row[3]),
                    homepage = unhtml(row[4]),
                    genre = unhtml(row[5]),
                    genre = unhtml(strip_tags(row[5])),
                    bitrate = to_int(row[6]),
                    format = row[7],
                    #format = row[7],
                    #listeners = to_int(listeners[5])
                ))
            except:
                pass #some field missing

        # done
        return r