fix(api): correct API request URL handling of spaces
Switched double quotes to single quotes in URL handling code for better consistency and to avoid potential issues with escaping characters. This ensures the proper construction of the API request URL, improving reliability when fetching wiki articles.
This commit is contained in:
parent
203e6cd2cf
commit
00d4f9694a
1 changed files with 1 additions and 1 deletions
|
@ -269,7 +269,7 @@ def wiki_article(
|
|||
logger.debug(f"Fetching {title} from {base_url}")
|
||||
|
||||
api_request = urllib.request.Request(
|
||||
f"{base_url}/api/rest_v1/page/html/{escape(quote(title.replace(" ", "_")), True).replace('/', '%2F')}",
|
||||
f"{base_url}/api/rest_v1/page/html/{escape(quote(title.replace(' ', '_')), True).replace('/', '%2F')}",
|
||||
headers=HEADERS,
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue