I'm trying to write a program that can check whether or not a YouTube video is in the music category or not. I have written some code but its almost as if Python is "lying" to me. Here is the code
>>> from bs4 import BeautifulSoup
>>> from urllib.request import urlopen
>>> url = "https://www.youtube.com/watch?v=LXuNNqoo1WQ"
>>> html = urlopen(url).read()
>>> soup = BeautifulSoup(html, "html.parser")
>>> tags = soup.find_all(class_="content watch-info-tag-list")
>>> hasmusictag = 'href="/channel/UC-9-kyTW8ZkZNDHQJ6FgpwQ">Music</a>' in
<ul class="content watch-info-tag-list">
<li><a class=" yt-uix-sessionlink spf-link " data-
As you can see, hasmusictag should return true, but it is returning false. I have no idea why. All help is appreciated!