hello im practicing my requests and web scraping skills, so im attempting to scrape the trending page on youtube, and pull the title of the videos that are trending, which is this link youtube
this is the code im running
import requests
from bs4 import BeautifulSoup
url = 'https://www.youtube.com/feed/trending'
html = requests.get(url)
soup = BeautifulSoup(html.content, "html.parser")
a = soup.find_all("a", {"id": "video-title"})
print(a)
and its returning [], i dont understand why its returning [] when its the in the source code,
Aucun commentaire:
Enregistrer un commentaire