0

Hello I want to scrape a weather website which is https://www.theweathernetwork.com/. I write below code to get live weather but didn't get any value in my code.

input

from bs4 import BeautifulSoup
import requests


html_page = requests.get("https://www.theweathernetwork.com/bd/weather/dhaka/dhaka")
soup = BeautifulSoup(html_page.content, 'lxml')

content=soup.find(class_='wx-content current-obs')

temp=content.find('span', class_='temp')

temp

output

[<span>°</span>]
HMBR IT
  • 69
  • 6

0 Answers0