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.
This commit is contained in:
Kumi 2024-09-19 19:13:34 +02:00
parent 00d4f9694a
commit b095d8c9df
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -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)