aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wikipediafs/article.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wikipediafs/article.py b/src/wikipediafs/article.py
index fc3c822..9170f4e 100644
--- a/src/wikipediafs/article.py
+++ b/src/wikipediafs/article.py
@@ -45,8 +45,10 @@ class Article(SGMLParser):
password=None,
):
SGMLParser.__init__(self)
-
- self.name = name
+
+ # Mediawiki replaces spaces with underscores
+ # because an URL cannot contain spaces
+ self.name = name.replace(" ", "_")
self.host = host
self.basename = basename
self.cookie_str = cookie_str