Skip to content

Commit

Permalink
Merge branch 'mampfes:master' into new_sica_lu_api
Browse files Browse the repository at this point in the history
  • Loading branch information
Foxi352 committed Sep 30, 2024
2 parents c1f8746 + 7eac857 commit 0c95b00
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@
"street": "ARGINE COPERMIO OVEST",
"house_number": 74,
},
"Torino Corso Quintino Sella 11 Scala A": {
"city": "Torino",
"street": "Corso Quintino Sella",
"house_number": "11 Scala A",
},
}

HOW_TO_GET_ARGUMENTS_DESCRIPTION = { # Optional dictionary to describe how to get the arguments, will be shown in the GUI configuration form above the input fields, does not need to be translated in all languages
Expand Down Expand Up @@ -184,7 +189,7 @@ def get_house_numbers(
"istat": city_id,
"streetcode": street_code,
# only use the first part of the house number if it contains a slash as this seems to break the search and the API should still return the correct address
"search": search.lower().split("/")[0],
"search": search.lower().split("/")[0].split()[0],
}
r = requests.get(API_URL, params=params)
r.raise_for_status()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ def fetch(self):
for item in scheduleItems:
BinType = item.find("h2", class_="schedule__title")
NextCollection = item.find("p", class_="schedule__summary")
if not NextCollection:
continue
# bin_type_text = BinType.text.strip()
# next_collection_text = NextCollection.text.strip().split(REM_STRING1, 1)[0].strip()
# date_object = datetime.strptime(next_collection_text, "%A %d %b %Y")
Expand Down

0 comments on commit 0c95b00

Please sign in to comment.