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