Check-in [651abb068d]
Overview
| Comment: | temporary workaround: topRadioStations, still need to discover original list |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
651abb068deeba280509ea97baed9ce3 |
| User & Date: | mario on 2022-02-15 21:53:01 |
| Other Links: | manifest | tags |
Context
|
2022-02-15
| ||
| 22:05 | Extract JSON blob from __NEXT_DATA__ script section check-in: b8a37b9b5b user: mario tags: trunk | |
| 21:53 | temporary workaround: topRadioStations, still need to discover original list check-in: 651abb068d user: mario tags: trunk | |
|
2021-02-06
| ||
| 15:06 | Simplify config description to avoid `,` commas paired with `|` pipe separator (pluginconf regex is more relaxed where ST2 would strictly only allow either) check-in: 34bb0c97d8 user: mario tags: trunk | |
Changes
Modified contrib/radionet.py from [2899884b53] to [47338112d3].
| ︙ | ︙ | |||
159 160 161 162 163 164 165 |
));
return r
# process json
def from_json(self, ls_json):
ls = []
for js in ls_json:
| | > > | | 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
));
return r
# process json
def from_json(self, ls_json):
ls = []
for js in ls_json:
js = json.loads(js)["data"]
print(json.dumps(js, indent=4))
ls += js["topTenStations"]#["playables"]
r = []
for row in ls:
href = row["id"]
r.append(dict(
name = href,
title = row["name"],
genre = ",".join(row.get("genres", [])),
url = "urn:radionet:"+href,
playing = row.get("city", row.get("country", "-")),
homepage = "http://www.radio.net/s/{}".format(href),
img = row["logo100x100"],
))
print(row)
return r
|
| ︙ | ︙ |