Skip to content

Commit

Permalink
Fix: GFA Lüneburg - set house number correctly (#2946)
Browse files Browse the repository at this point in the history
* Add Streetchanged request

* Fix test case description

* fix - Doc issues
  • Loading branch information
ReneNulschDE authored Oct 30, 2024
1 parent 23ef38f commit d5b3c0f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 15 deletions.
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

0 comments on commit d5b3c0f

Please sign in to comment.