I wanted to get .text of , but it simply doesn't work.
Here is my code:
from bs4 import BeautifulSoup
import request
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"
<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>
I need to extract text from that title up here!
Something is wrong here, but I can't find that error in code. Can someone help me ?