0

`I was trying to scrape the data from chromium but I was not able to scrape the data. If anyone have any solution would really appreaciate

import requests
from bs4 import BeautifulSoup

url = 'https://bugs.chromium.org/p/chromium/issues/detail?id=1406673'
response = requests.get(url)
soup = BeautifulSoup(response.text, 'html.parser')
title = soup.find('div', class_='container-outside')
title
if title:
    title = title.find('aside', class_='metadata-container').find('div', class_='container-issue').find('div', class_='issue-header-container').find('h2').text.strip()
    print(title)`your text`
else:
    print("Title not found")

it's showing Title not found!

MattDMo
  • 100,794
  • 21
  • 241
  • 231
  • 1
    That's because there's no `
    ` in the `soup` object. It looks like the site is rendered by Javascript. Use selenium or requests_html instead.
    – MattDMo Jan 12 '23 at 19:14

0 Answers0