84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
self.status(float(i) / max)
if html.find("latest/" + str(i)):
html = html + ahttp.get(self.base_url + self.catmap[cat] + "/latest/%s" % i)
html = re.sub("</body>.+?<body>", "", html, 100, re.S)
self.status("Extracting mixesβ¦")
# extract
for card in [pq(e) for e in pq(html)(".card-audio")]:
r = {
"title": card(".card-audio-title span").text(),
"playing": card(".card-audio-user a").text(),
"genre": card(".card-tags a span").text(),
# url will be substitute later
"url": self.base_url + card(".audio-image-link").attr("href"),
"homepage": self.base_url + card(".audio-image-link").attr("href"),
|
|
|
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
self.status(float(i) / max)
if html.find("latest/" + str(i)):
html = html + ahttp.get(self.base_url + self.catmap[cat] + "/latest/%s" % i)
html = re.sub("</body>.+?<body>", "", html, 100, re.S)
self.status("Extracting mixesβ¦")
# extract
for card in [pq(e) for e in pq(html).find(".card-audio")]:
r = {
"title": card(".card-audio-title span").text(),
"playing": card(".card-audio-user a").text(),
"genre": card(".card-tags a span").text(),
# url will be substitute later
"url": self.base_url + card(".audio-image-link").attr("href"),
"homepage": self.base_url + card(".audio-image-link").attr("href"),
|