feat: support for lockupViewModel inside of channels' video feed
this is rare and currently a/b tested
This commit is contained in:
@@ -45,6 +45,7 @@ import ythdd_struct_parser
|
||||
# IDEAS:
|
||||
# [*] /api/v1/popular returns last requested videos by the IP (serving as multi-device history?)
|
||||
# [*] /api/v1/trending returns recently archived videos
|
||||
# [*] produce continuations instead of extracting them
|
||||
# ----------
|
||||
# NOT PLANNED/MAYBE IN THE FUTURE:
|
||||
# [ ] /api/v1/auth/subscriptions (stub? db?)
|
||||
@@ -424,6 +425,7 @@ def videos(data):
|
||||
if is_mix_or_playlist:
|
||||
# neither mixes nor playlists are currently supported by the invidious api
|
||||
continue
|
||||
# note: this model is similar, but not identical to the one in ythdd_struct_parser. perhaps they can be both handled in the struct parser some time.
|
||||
lmvm = safeTraverse(y, ['metadata', 'lockupMetadataViewModel'], default=[])
|
||||
related_entry['videoId'] = safeTraverse(y, ['contentId'])
|
||||
related_entry['title'] = safeTraverse(lmvm, ['title', 'content'])
|
||||
|
||||
Reference in New Issue
Block a user