vrijeme

 avatar
unknown
python
2 years ago
455 B
6
Indexable
from requests_html import HTMLSession


s = HTMLSession()

querry = input("Enter city to check weather: ")
url = f"https://www.google.com/search?q=vrijeme+{querry}"

r = s.get(url)

temperature = r.html.find("span#wob_tm", first=True).text
unit = r.html.find("div.vk_bk.wob-unit span.wob_t", first = True).text
weather = r.html.find("div.VQF4g", first = True).find("span#wob_dc", first = True).text

print(querry, temperature, unit, weather)
Editor is loading...