Answers for "Smart Weather Information App Using Python"

0

Smart Weather Information App Using Python

soup = BeautifulSoup(res.text,'html.parser')   
    location = soup.select('#wob_loc')[0].getText().strip()  
    current_time = soup.select('#wob_dts')[0].getText().strip()       
    info = soup.select('#wob_dc')[0].getText().strip() 
    weather = soup.select('#wob_tm')[0].getText().strip()
    information = f"{location} n {current_time} n {info} n {weather} °C "
Posted by: Guest on January-12-2022

Python Answers by Framework

Browse Popular Code Answers by Language