mercredi 26 mai 2021

Whats the problem with my code it prints none when I use find() method and when I use findAll() method it prints empty array?

from bs4 import BeautifulSoup
import requests

yt_link = "https://www.youtube.com/watch?v=bKDdT_nyP54"

response = requests.get(yt_link)
soup = BeautifulSoup(response.content, 'html.parser')
title = soup.findAll('div', {'class': 'style-scope ytd-app'})
print(title)

It prints empty array and if I use find() method then it prints none as a result.Why does this happen. Please help me I am stuck here.




Aucun commentaire:

Enregistrer un commentaire