60 search_res = resp.json()
64 for item
in search_res.get(
"data", {}).get(
"result", []):
65 title = utils.html_to_text(item[
"title"])
67 thumbnail = item[
"pic"]
68 description = item[
"description"]
69 author = item[
"author"]
70 video_id = item[
"aid"]
71 unix_date = item[
"pubdate"]
73 formatted_date = datetime.fromtimestamp(unix_date)
76 duration = utils.parse_duration_string(item[
"duration"])
77 if duration
and duration > timedelta(minutes=60):
80 iframe_url = f
"https://player.bilibili.com/player.html?aid={video_id}&high_quality=1&autoplay=false&danmaku=0"
86 "content": description,
88 "publishedDate": formatted_date,
90 "thumbnail": thumbnail,
91 "iframe_src": iframe_url,
92 "template":
"videos.html",