Skip to content

Commit

Permalink
fix lrasha_de
Browse files Browse the repository at this point in the history
  • Loading branch information
steffenrapp authored and 5ila5 committed Jan 21, 2024
1 parent 18f604c commit 89cde24
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
DESCRIPTION = "Source for lrasha.de - Landkreis Schwäbisch Hall"
URL = "https://www.lrasha.de"
TEST_CASES = {
"Ilshofen": {"location": "114"}
"Ilshofen": {"location": "68345"}
}

API_URL = "http://exchange.cmcitymedia.de/landkreis-schwaebisch-hallt3/wasteCalendarExport.php?location="
API_URL = "http://api.cross-7.de/public/calendar/396/events/ics?SecondCategoryIds="
HEADERS = {"user-agent": "Mozilla/5.0 (xxxx Windows NT 10.0; Win64; x64)"}


Expand All @@ -25,11 +25,11 @@ def fetch(self):
full_url = API_URL + str(self._location)
r = requests.get(full_url, headers=HEADERS)
r.raise_for_status()

# parse ics file
r.encoding = "utf-8"
dates = self._ics.convert(r.text)

entries = []
for d in dates:
entries.append(Collection(d[0], d[1]))
Expand Down
6 changes: 3 additions & 3 deletions doc/source/lrasha_de.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ waste_collection_schedule:
sources:
- name: lrasha_de
args:
location: "97"
location: "68329"
```
### Configuration Variables
**location**
**location**
*(string) (required)*
## How to get the source arguments
Visit [Abfallkalender](https://www.lrasha.de/de/buergerservice/abfallwirtschaft/abfallkalender), select your location and click on search. Now copy the download link and paste it somewhere to see it. The number after `location=` has to be entered in the configuration.
Visit [Abfallkalender](https://www.lrasha.de/de/buergerservice/abfallwirtschaft/abfallkalender), select your location and click on import. Now you see a link to import the calendar. The number after `SecondCategoryIds=` has to be entered in the configuration.

0 comments on commit 89cde24

Please sign in to comment.