Skip to content

Instantly share code, notes, and snippets.

@daringer
Created July 27, 2018 17:57
Show Gist options
  • Save daringer/220dae1d4d080d5a55d5897e0e4f0a5b to your computer and use it in GitHub Desktop.
Save daringer/220dae1d4d080d5a55d5897e0e4f0a5b to your computer and use it in GitHub Desktop.
Muellmax.de get trash collection dates
from selenium import webdriver as drv
from selenium.webdriver import ChromeOptions
from selenium.webdriver.common.keys import Keys
opts = ChromeOptions()
opts.add_argument("--headless")
br = drv.Chrome(chrome_options=opts)
br.get("http://www.hanau.de/lih/sicherheit/abfall/009613/index.html")
elems = br.find_element_by_tag_name("input")
br.get("http://www.muellmax.de/abfallkalender/his/res/HisStart.php")
el = br.find_elements_by_name("mm_aus_ort")
el[0].click()
y = br.find_element_by_id("mm_frm_str_name")
y.send_keys("INSERT YOUR STREET HERE")
y.send_keys(Keys.RETURN)
button = br.find_element_by_name("mm_mon")
button.click()
alldays = br.find_elements_by_css_selector(".m_day")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment