updated examples with refactored scraper, increased speed of recommendation engine fetchibng by implementing normalized_names_to_video_info routine, that allows requesting multiple videos at a time

This commit is contained in:
Tristan Lee
2022-04-11 23:28:44 -05:00
parent 44a673f889
commit 0aac7493a4
6 changed files with 75 additions and 36 deletions

View File

@@ -29,6 +29,7 @@ KWARGS_LIST = [
('get_all_comments', ['video_id']),
('append_comment_reactions', ['comment_info_list']),
('normalized_name_to_video_info', ['normalized_name']),
('normalized_names_to_video_info', ['normalized_names']),
('get_streaming_url', ['canonical_url']),
('get_recommended', ['video_title', 'video_id']),]

View File

@@ -89,6 +89,7 @@ def resources():
video_id = VIDEO_ID,
video_title = VIDEO_TITLE,
normalized_name = NORMALIZED_NAME,
normalized_names = [NORMALIZED_NAME],
canonical_url = CANONICAL_URL,
full_video_info = FULL_VIDEO_INFO,
full_comment_info = {**COMMENT_INFO_LIST[0], **{'likes': 8, 'dislikes': 0}},