Check Weather Using Python

0

Check Weather Using Python

  • Check any city weather in world using it's name

Source Code:

#Follow @Programmerfect

import requests
from bs4 import BeautifulSoup
search = "weather in New Delhi"
url = f"https://www.google.com/search?&q={search}"
r = requests.get(url)
s = BeautifulSoup(r.text, "html.parser")
update = s.find("div",class_="BNeawe").text
print(update) 


 

Post a Comment

0Comments
Post a Comment (0)