Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: GFA Lüneburg - set house number correctly #2946

Merged
merged 3 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
DESCRIPTION = "Source for GFA Lüneburg."
URL = "https://www.gfa-lueneburg.de/"
TEST_CASES = {
"Andervenne Am Gallenberg": {
"Dahlem Hauptstr. 7": {
"city": "Dahlem",
"street": "Hauptstr.",
"house_number": 7,
Expand Down Expand Up @@ -82,8 +82,6 @@ def fetch(self):
)
r.raise_for_status()
r.encoding = "utf-8"
with open("test1.html", "w") as f:
f.write(r.text)

parser = HiddenInputParser()
parser.feed(r.text)
Expand All @@ -101,16 +99,26 @@ def fetch(self):
)
r.raise_for_status()

args = parser.args
args["Ort"] = self._city
args["Strasse"] = self._street
args["Hausnummer"] = str(self._hnr)
args["Method"] = "POST"
args["SubmitAction"] = "STREETCHANGED"
args["Focus"] = "Strasse"
r = session.post(SERVLET, data=args)
r.raise_for_status()

args["SubmitAction"] = "forward"
r = session.post(
SERVLET,
data=args,
)
r.raise_for_status()

args[
"ApplicationName"
] = "com.athos.kd.lueneburg.WasteDisposalServicesBusinessCase"
args["ApplicationName"] = (
"com.athos.kd.lueneburg.WasteDisposalServicesBusinessCase"
)
args["SubmitAction"] = "filedownload_ICAL"
args["IsLastPage"] = "true"
args["Method"] = "POST"
Expand Down
17 changes: 8 additions & 9 deletions doc/source/gfa_lueneburg_de.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Abfallwirtschaftsbetrieb Emsland
# GFA Lüneburg

Support for schedules provided by [Emsland Abfallwirtschaftsbetrieb](https://www.awb-emsland.de/), Germany.
Support for schedules provided by [GFA Lüneburg](https://www.gfa-lueneburg.de/service/abfuhrkalender.html), Germany.

## Configuration via configuration.yaml

```yaml
waste_collection_schedule:
sources:
- name: awb_emsland_de
- name: gfa_lueneburg_de
args:
city: CITY
street: STREET
Expand All @@ -17,21 +17,20 @@ waste_collection_schedule:
### Configuration Variables

**city**
*(string) (required)*
_(string) (required)_

**street**
*(string) (required)*
_(string) (required)_

**house_number**
*(integer) (required)*

_(integer) (required)_

## Example

```yaml
waste_collection_schedule:
sources:
- name: awb_emsland_de
- name: gfa_lueneburg_de
args:
city: "Dahlem"
street: "Hauptstr"
Expand All @@ -41,7 +40,7 @@ waste_collection_schedule:
```yaml
waste_collection_schedule:
sources:
- name: awb_emsland_de
- name: gfa_lueneburg_de
args:
city: Wendish Evern
street: Kückenbrook
Expand Down