Grab current years calendar
This commit is contained in:
parent
ca43be7db3
commit
63f086651c
|
@ -1,5 +1,6 @@
|
||||||
import configparser
|
import configparser
|
||||||
import icalendar
|
import icalendar
|
||||||
|
import datetime
|
||||||
import requests
|
import requests
|
||||||
import urllib
|
import urllib
|
||||||
import json
|
import json
|
||||||
|
@ -11,6 +12,7 @@ def read_config():
|
||||||
return config
|
return config
|
||||||
|
|
||||||
config = read_config()
|
config = read_config()
|
||||||
|
current_year = datetime.datetime.now().year
|
||||||
|
|
||||||
# request locations supportet by the endpoint
|
# request locations supportet by the endpoint
|
||||||
# https://nuernberg-abfallapp.regioit.de/abfall-app-nuernberg/rest/orte
|
# https://nuernberg-abfallapp.regioit.de/abfall-app-nuernberg/rest/orte
|
||||||
|
@ -49,7 +51,7 @@ for trash_type in trash_types:
|
||||||
|
|
||||||
query = {
|
query = {
|
||||||
"format": ["ics"],
|
"format": ["ics"],
|
||||||
"jahr": ["2019"],
|
"jahr": [current_year],
|
||||||
"ort": ["Nürnberg"],
|
"ort": ["Nürnberg"],
|
||||||
"strasse": [street_id],
|
"strasse": [street_id],
|
||||||
"hnr": [housenumber_id],
|
"hnr": [housenumber_id],
|
||||||
|
|
Loading…
Reference in a new issue