Stadtreinigung Leipzig - Fix ics download (#1704)

* fix ics download

* Update stadtreinigung_leipzig_de.md

add additional required parameters to url

* Update yaml+doc

* Extend HowTo
This commit is contained in:
Rene Nulsch
2024-01-21 15:39:39 +01:00
committed by GitHub
parent b77651ca8e
commit 6018f27245
3 changed files with 8 additions and 6 deletions

View File

@@ -44,6 +44,8 @@ class Source:
# get ics file
params = {
"position_nos": id,
"name": f"{self._street} {self._house_number}",
"mode": "download",
}
r = requests.get(
"https://stadtreinigung-leipzig.de/wir-kommen-zu-ihnen/abfallkalender/ical.ics",

View File

@@ -5,8 +5,8 @@ Stadtreinigung Leipzig is supported by the generic [ICS](/doc/source/ics.md) sou
## How to get the configuration arguments
- Goto <https://stadtreinigung-leipzig.de/> and select your location.
- Click on `Abonnieren` to get a webcal link.
- Goto <https://stadtreinigung-leipzig.de/wir-kommen-zu-ihnen/abfallkalender/>, select your location and click on "Termine anzeigen".
- Copy the address of the link 'Herunterladen' to get a webcal link.
- Replace the `url` in the example configuration with this link.
## Examples
@@ -19,5 +19,5 @@ waste_collection_schedule:
- name: ics
args:
regex: (.*), .*
url: https://stadtreinigung-leipzig.de/wir-kommen-zu-ihnen/abfallkalender/ical.ics?position_nos=38296&name=Sandgrubenweg
url: https://stadtreinigung-leipzig.de/wir-kommen-zu-ihnen/abfallkalender/ical.ics?position_nos=38296&name=Sandgrubenweg&mode=download
```

View File

@@ -1,10 +1,10 @@
title: Stadtreinigung Leipzig
url: https://stadtreinigung-leipzig.de/
howto: |
- Goto <https://stadtreinigung-leipzig.de/> and select your location.
- Click on `Abonnieren` to get a webcal link.
- Goto <https://stadtreinigung-leipzig.de/wir-kommen-zu-ihnen/abfallkalender/>, select your location and click on "Termine anzeigen".
- Copy the address of the link 'Herunterladen' to get a webcal link.
- Replace the `url` in the example configuration with this link.
test_cases:
Sandgrubenweg 27:
url: "https://stadtreinigung-leipzig.de/wir-kommen-zu-ihnen/abfallkalender/ical.ics?position_nos=38296&name=Sandgrubenweg"
url: "https://stadtreinigung-leipzig.de/wir-kommen-zu-ihnen/abfallkalender/ical.ics?position_nos=38296&name=Sandgrubenweg&mode=download"
regex: "(.*), .*"