fix exception when data-client-items doesn't exist
This commit is contained in:
@@ -424,12 +424,15 @@ class BCFreeDownloader:
|
|||||||
"band_id": int(li["data-band-id"]),
|
"band_id": int(li["data-band-id"]),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
for obj in json.loads(html.unescape(grid.get("data-client-items", {}))):
|
|
||||||
if obj.get("filtered"):
|
client_items = grid.get("data-client-items")
|
||||||
continue
|
if client_items:
|
||||||
# normalize to fit the other half
|
for obj in json.loads(html.unescape(client_items)):
|
||||||
obj["url"] = obj.pop("page_url")
|
if obj.get("filtered"):
|
||||||
releases.append(obj)
|
continue
|
||||||
|
# normalize to fit the other half
|
||||||
|
obj["url"] = obj.pop("page_url")
|
||||||
|
releases.append(obj)
|
||||||
|
|
||||||
# fixup local urls into global ones
|
# fixup local urls into global ones
|
||||||
for release in releases:
|
for release in releases:
|
||||||
|
|||||||
Reference in New Issue
Block a user