diff --git a/web-scraping/youtube-extractor/README.md b/web-scraping/youtube-extractor/README.md index 9cdeb8df..30fa4e8e 100644 --- a/web-scraping/youtube-extractor/README.md +++ b/web-scraping/youtube-extractor/README.md @@ -8,17 +8,17 @@ To run this: **Output:** ``` Title: Me at the zoo - Views: 172639597 + Views: 218412790 Published at: 2005-04-23 Video Duration: 0:18 Video tags: me at the zoo, jawed karim, first youtube video - Likes: 8188077 - Dislikes: 191986 + Likes: 11084943 + Dislikes: UNKNOWN - Description: The first video on YouTube. While you wait for Part 2, listen to this great song: https://www.youtube.com/watch?v=zj82_v2R6ts + Description: Watching Matt Koval's announcement about the removal of dislikes, I thought something was off.The spoken words did not match the eyes. The video reminded me ... Channel Name: jawed Channel URL: https://www.youtube.com/channel/UC4QobU6STFB0P71PMvOGN5A - Channel Subscribers: 1.98M subscribers + Channel Subscribers: 2.66 million subscribers ``` diff --git a/web-scraping/youtube-extractor/extract_video_info.py b/web-scraping/youtube-extractor/extract_video_info.py index 042ce4f8..4b0fa0f3 100644 --- a/web-scraping/youtube-extractor/extract_video_info.py +++ b/web-scraping/youtube-extractor/extract_video_info.py @@ -53,7 +53,7 @@ def get_video_info(url): channel_name = soup.find("span", itemprop="author").next.next['content'] # channel URL # channel_url = soup.find("span", itemprop="author").next['href'] - channel_url = f"https://www.youtube.com/{channel_tag}" + channel_url = f"https://www.youtube.com/channel/{channel_tag}" # number of subscribers as str channel_subscribers = videoSecondaryInfoRenderer['owner']['videoOwnerRenderer']['subscriberCountText']['accessibility']['accessibilityData']['label'] # channel details (old way)