mirror of
https://github.com/sascha-hemi/hacs_waste_collection_schedule.git
synced 2026-03-21 04:06:03 +01:00
Update abfall_neunkirchen_siegerland_de.py
change searchterm to street
This commit is contained in:
@@ -13,13 +13,13 @@ TEST_CASES = {
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
class Source:
|
||||
def __init__(self, searchterm):
|
||||
self._searchterm = searchterm
|
||||
def __init__(self, strasse):
|
||||
self._strasse = strasse
|
||||
self._ics = ICS()
|
||||
|
||||
def fetch(self):
|
||||
|
||||
args = {"out":"json", "type": "abto", "select":"2", "refid": "3362.1", "term": self._searchterm }
|
||||
args = {"out":"json", "type": "abto", "select":"2", "refid": "3362.1", "term": self._strasse }
|
||||
header = {"referer": "https://www.neunkirchen-siegerland.de"}
|
||||
r = requests.get("https://www.neunkirchen-siegerland.de/output/autocomplete.php", params=args,headers=header)
|
||||
|
||||
@@ -33,7 +33,7 @@ class Source:
|
||||
raise Exception("no address found")
|
||||
|
||||
if len(ids) > 1:
|
||||
raise Exception (" to many addresses found, specify more detailed search term")
|
||||
raise Exception (" to many addresses found, specify more detailed street name")
|
||||
|
||||
args = {"ModID":48, "call": "ical", "pois": ids[0][0], "kat": 1, "alarm":0}
|
||||
r = requests.get("https://www.neunkirchen-siegerland.de/output/options.php", params=args,headers=header)
|
||||
|
||||
Reference in New Issue
Block a user