From 23245a6aa6eef16d560a9792f97fe4674da1c04d Mon Sep 17 00:00:00 2001 From: Disha Himani AS <114332715+dishahimani@users.noreply.github.com> Date: Sat, 16 Nov 2024 23:47:02 +0530 Subject: [PATCH] Updated main_face.py --- code/main_face.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/main_face.py b/code/main_face.py index e55b65d..edb7ac5 100644 --- a/code/main_face.py +++ b/code/main_face.py @@ -19,7 +19,8 @@ def play_first_song(final_emotion): match = re.search(r'/watch\?v=([^\"]+)', html_content) if match: video_id = match.group(1) - video_url = f"https://www.youtube.com/watch?v={video_id}" + #video_url = f"https://www.youtube.com/watch?v={video_id}" + video_url = f"https://www.youtube.com/watch?v={video_id.encode('utf-8').decode('unicode_escape')}" webbrowser.open(video_url) # Load the pre-trained facial expression recognition model