41 except Exception
as e:
45 if "data" not in data
or "templates" not in data[
"data"]:
48 for entry
in data[
"data"][
"templates"]:
49 album_info = entry.get(
"albumInfo", {})
52 release_time = album_info.get(
"releaseTime", {}).get(
"value")
55 published_date = datetime.strptime(release_time,
"%Y-%m-%d")
56 except (ValueError, TypeError):
59 length = parse_duration_string(album_info.get(
"subscriptionContent"))
62 'url': album_info.get(
"pageUrl",
"").replace(
"http://",
"https://"),
63 'title': album_info.get(
"title",
""),
64 'content': album_info.get(
"brief", {}).get(
"value",
""),
65 'template':
'videos.html',
67 'publishedDate': published_date,
68 'thumbnail': album_info.get(
"img",
""),