Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kawainime authored Nov 28, 2023
1 parent 8b1ed90 commit af341d2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
url = requests.get(yahoo_url)
page = BeautifulSoup(url.content, "html5lib")

fecha = datetime.now(timezone('Asia/Jakarta'))
fecha = datetime.now(timezone('US/Central'))
print("DONE")
print("")

Expand All @@ -26,8 +26,8 @@
######### VARIABLES #########
temp_celsius = page.select_one("span.Va\(t\).D\(n\).celsius.celsius_D\(b\)").text
weather = page.find('p', {'class': 'Fz(1.40rem)--miw1024 Fz(1.12rem)'}).text.strip()
now = datetime.now(timezone('Asia/Jakarta'))
today = datetime.now(timezone('Asia/Jakarta')).date()
now = datetime.now(timezone('US/Central'))
today = datetime.now(timezone('US/Central')).date()
temp_sens = page.find("dd", class_="D(n) celsius_D(b)").text.replace("°","")
humidity = page.find_all("div",class_="D(f) Py(8px) Bdb Bdbs(d) Bdbw(1px) Bdbc($weatherBorderColor) Jc(sb)")[1].find("dd").text.replace("%","")
visibility = page.find_all("div",class_="D(f) Py(8px) Bdb Bdbs(d) Bdbw(1px) Bdbc($weatherBorderColor) Jc(sb)")[2].find("dd", class_="D(n) kilometers_D(b)").text.replace(" km","")
Expand Down

0 comments on commit af341d2

Please sign in to comment.