From b095d8c9df49cd819034328af0686a8653d61db1 Mon Sep 17 00:00:00 2001 From: Kumi Date: Thu, 19 Sep 2024 19:13:34 +0200 Subject: [PATCH] fix: standardize quote usage in URL generation Updated single quote usage in URL generation for consistency and readability in `wiki_article` function. This improves code maintainability and avoids potential issues with character escaping. --- src/wikimore/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wikimore/app.py b/src/wikimore/app.py index febf9e2..2eec6d1 100644 --- a/src/wikimore/app.py +++ b/src/wikimore/app.py @@ -431,7 +431,7 @@ def wiki_article( if base_url not in app.licenses: try: mediawiki_api_request = urllib.request.Request( - f"{base_url}/w/rest.php/v1/page/{escape(quote(title.replace(" ", "_")), True)}", + f"{base_url}/w/rest.php/v1/page/{escape(quote(title.replace(' ', '_')), True)}", headers=HEADERS, ) mediawiki_api_response = urllib.request.urlopen(mediawiki_api_request)