133 for result
in json[
"items"]:
135 uploaded = result.get(
"uploaded", -1)
140 "title": result.get(
"title",
""),
141 "publishedDate": parser.parse(time.ctime(uploaded / 1000))
if uploaded != -1
else None,
142 "iframe_src":
_frontend_url() +
'/embed' + result.get(
"url",
""),
143 "views": humanize_number(result[
"views"]),
145 length = result.get(
"duration")
147 item[
"length"] = datetime.timedelta(seconds=length)
149 if piped_filter ==
'videos':
150 item[
"template"] =
"videos.html"
152 item[
"content"] = result.get(
"shortDescription",
"")
or ""
153 item[
"thumbnail"] = result.get(
"thumbnail",
"")
155 elif piped_filter ==
'music_songs':
156 item[
"template"] =
"default.html"
157 item[
"thumbnail"] = result.get(
"thumbnail",
"")
158 item[
"content"] = result.get(
"uploaderName",
"")
or ""
164 "engine_data": json[
"nextpage"],