diff --git a/wiki rss to rocket chat.py b/wiki rss to rocket chat.py index 3f683bf..7ab447c 100644 --- a/wiki rss to rocket chat.py +++ b/wiki rss to rocket chat.py @@ -148,7 +148,10 @@ def main(one_shot=False, empty_db=False): match = re.search(r'(.*?title=.*?)(.*)', data["id"]) if match: - wiki_link = match.group(1) + title + # Replace spaces with underscores in the title + title_modified = title.replace(' ', '_') + # Concatenate match.group(1) and modified title + wiki_link = match.group(1) + title_modified wiki_id = match.group(2) else: wiki_id = "Unexpected link"