I wanted to get .text of <a>, but it simply doesn't work.
Here is my code:
Here is my code:
from bs4 import BeautifulSoup
import requests
generatedLink = "MyLink"
page = requests.get(generatedLink)
contents = page.text
soup = BeautifulSoup(contents, "html.parser")
name = soup.find('a',class_=["yt-simple-endpoint", "style-scope", "ytd-video-renderer"])
print(name)And it returns "None"Output: <a id="video-title" class="yt-simple-endpoint style-scope ytd-video-renderer" aria-label="TURNIR 1 VS 1 U LOLU FINALEE!! od korisnika KaLuu Vrijeme streaminga: prije 3 dana 3 sata i 49 minuta 644 pregleda" href="/watch?v=5N4X4hjkzOw" title="TURNIR 1 VS 1 U LOLU FINALEE!!">
TURNIR 1 VS 1 U LOLU FINALEE!!
</a>Ik that something is rly wrong here, but if you can, help me please. Thank you!
