Diff
Differences From Artifact [6f48b334fd]:
- File contrib/radionet.py — part of check-in [466f591a1a] at 2020-05-12 15:57:26 on branch trunk — radionet updated to extract from horrendous new html pages. Perhaps switching to extracting just the JSON blob later on. urn: resolution remains unchanged. (user: mario, size: 6132) [annotate] [blame] [check-ins using]
To Artifact [4a9edf7fc3]:
- File contrib/radionet.py — part of check-in [e9c2e9a3a2] at 2020-05-15 19:36:33 on branch trunk — Apply more `self.status(i / pages)` progressbar calls for some channels. (user: mario, size: 6190) [annotate] [blame] [check-ins using]
| ︙ | |||
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | + + |
# Fetch entries
def update_streams(self, cat, search=None):
# category page, get key
urlcat = cat.replace(" ", "-").lower()
self.status(0.1)
html = ahttp.get(self.genre_url.format(urlcat))
for p in range(2, 4):
self.status(p / 5.5)
if html.find('?p={}"'.format(p)) >= 0:
html += ahttp.get(self.genre_url.format(urlcat) + "?p={}".format(p))
self.set_key(html)
r = []
# prefetch images from embedded json (genres and location would also be sourceable from "playables":[…])
imgs = dict(re.findall('\],"id":"(\w+)","logo100x100":"(htt[^"]+)",', html))
|
| ︙ |