From 2fdac3ec148d63c17a34046206477dd016293a74 Mon Sep 17 00:00:00 2001 From: gabrielkheisa Date: Sat, 5 Nov 2022 09:26:25 +0700 Subject: [PATCH] fix --- script.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/script.py b/script.py index 1db3304..569b25a 100644 --- a/script.py +++ b/script.py @@ -32,10 +32,11 @@ while(1): cuaca = browser.find_element_by_xpath("//*[@id=\"wob_dc\"]").get_attribute('textContent') last_update = browser.find_element_by_xpath("//*[@id=\"wob_dts\"]").get_attribute('textContent') - + + suhu = suhu + "℃" - payload = suhu + "=" + kelembapan + "=" + presipitasi + "=" + angin + "=" + cuaca + " GMT+7" + "=" + last_update + "=" + dt_string + "=" + key + payload = suhu + "=" + kelembapan + "=" + presipitasi + "=" + angin + "=" + cuaca + "=" + last_update + "=" + dt_string + " GMT+7" + "=" + key print(payload) @@ -52,4 +53,6 @@ while(1): except: print("Error gak jelas, skip") - browser.quit() \ No newline at end of file + browser.quit() + print("Sleep for 1 hour") + time.sleep(60*60) \ No newline at end of file