summaryrefslogtreecommitdiff
path: root/proposals.py
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2025-03-09 10:51:04 +0100
committerMartin Fischer <martin@push-f.com>2025-03-09 10:52:19 +0100
commit1677f3986df69b5600c5986f31534af2fa693ea3 (patch)
tree517cba46d6b0b871e2ae3c395f1b781fa13e40d6 /proposals.py
parent8c93914d9f896e67fd147e8cce09238c41097370 (diff)
refactor: make URL query params more readable
Diffstat (limited to 'proposals.py')
-rwxr-xr-xproposals.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/proposals.py b/proposals.py
index 35a7f38..ae6a451 100755
--- a/proposals.py
+++ b/proposals.py
@@ -14,7 +14,13 @@ osmwiki = pywikiapi.Site(OSMWIKI_ENDPOINT)
# https://wiki.openstreetmap.org/w/index.php?title=Template:Proposal_page&action=edit
res = requests.get(
- 'https://wiki.openstreetmap.org/w/api.php?action=expandtemplates&prop=wikitext&format=json&text={%7B%23invoke:languages/table%7Cjson}}'
+ OSMWIKI_ENDPOINT,
+ params=dict(
+ action='expandtemplates',
+ prop='wikitext',
+ format='json',
+ text='{{#invoke:languages/table|json}}',
+ ),
)
langs = json.loads(res.json()['expandtemplates']['wikitext'])