65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84 | j = json.loads(ahttp.get(
"https://radiolist.net/wp-json/wp-radio/v1/station?paginate={}&keyword={}&country=&genre={}&sort=asc&perpage=50&_locale=user".format(i, search or "", catid)
))
for e in j["data"]["items"]:
entries.append({
"id": e["id"],
"title": e["title"],
"favicon": e["thumbnail"],
"url": e["stream"],
"homepage": e["website"],
"playing": e["slogan"],
"genre": " ".join([g["name"] for g in e["genres"]]),
#"country": e["locations"]["country"]["name"],
})
if i >= j["data"]["total"]:
break
return entries
|
|
| 65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84 | j = json.loads(ahttp.get(
"https://radiolist.net/wp-json/wp-radio/v1/station?paginate={}&keyword={}&country=&genre={}&sort=asc&perpage=50&_locale=user".format(i, search or "", catid)
))
for e in j["data"]["items"]:
entries.append({
"id": e["id"],
"title": e["title"],
"img": e["thumbnail"],
"url": e["stream"],
"homepage": e["website"],
"playing": e["slogan"],
"genre": " ".join([g["name"] for g in e["genres"]]),
#"country": e["locations"]["country"]["name"],
})
if i >= j["data"]["total"]:
break
return entries
|