Diff
Differences From Artifact [faf1e3671e]:
- File channels/musicgoal.py — part of check-in [d3b1418bc6] at 2014-04-08 21:16:12 on branch py3 — rename http to ahttp to avoid conflict with Python3 modules, change .iteritems and xrange, remove same remaining plain print statements (user: mario, size: 3673) [annotate] [blame] [check-ins using] [more...]
To Artifact [487d9e3db3]:
- File channels/musicgoal.py — part of check-in [b9af78503d] at 2014-04-27 22:48:23 on branch trunk — Fully replace ahttp.ajax with ahttp.get() wrapper (user: mario, size: 3687) [annotate] [blame] [check-ins using]
| ︙ | ︙ | |||
66 67 68 69 70 71 72 |
elif cat in self.radio:
grp = "radio"
url = self.api_radio % cat.lower().replace(" ","").replace("&","")
else:
return []
# retrieve API data
| | | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
elif cat in self.radio:
grp = "radio"
url = self.api_radio % cat.lower().replace(" ","").replace("&","")
else:
return []
# retrieve API data
data = http.get(url, params=None, ajax=1)
data = json.loads(data)
# tranform datasets
if grp == "podcast":
return [{
"genre": cat,
"title": row["titel"],
|
| ︙ | ︙ |