fix(app): encode slashes in wiki article requests
Ensure slashes in Wiki article titles are URL encoded to prevent request errors. This change resolves issues where titles containing slashes could break the API calls. Fixes #23
This commit is contained in:
parent
90c068d128
commit
efc48e83e8
1 changed files with 1 additions and 1 deletions
|
@ -223,7 +223,7 @@ def wiki_article(
|
||||||
logger.debug(f"Fetching {title} from {base_url}")
|
logger.debug(f"Fetching {title} from {base_url}")
|
||||||
|
|
||||||
api_request = urllib.request.Request(
|
api_request = urllib.request.Request(
|
||||||
f"{base_url}/api/rest_v1/page/html/{quote(escape(title.replace(' ', '_'), False))}",
|
f"{base_url}/api/rest_v1/page/html/{quote(escape(title.replace(' ', '_'), False)).replace('/', '%2F')}",
|
||||||
headers=HEADERS,
|
headers=HEADERS,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue