remove table of contents on pages.dev now that the URLs are ibb.co instead of imgur

This commit is contained in:
Rust1667 2023-05-30 11:10:40 +02:00 committed by taskylizard
parent d4a6ac7f6f
commit 4104be0f59

View File

@ -42,7 +42,7 @@ def change_some_general_formatting(text):
def remove_backtowiki_and_toc(text):
text = re.sub('\*\*\[◄◄ Back to Wiki Index\]\(https://www\.reddit\.com/r/FREEMEDIAHECKYEAH/wiki/index\)\*\*\n', '', text, flags=re.MULTILINE)
text = re.sub(r'\*\*\[Table of Contents\]\(https://i\.imgur\.com/[^()\[\]]*\.png\)\*\* - For mobile users\n', '', text, flags=re.MULTILINE)
text = re.sub(r'\*\*\[Table of Contents\]\(https?:\/\/.*?ibb\.co.*\)\*\* - For mobile users\n', '', text, flags=re.MULTILINE)
text = re.sub("\*\*\*\n\*\*\*\n\*\*\*\n\*\*\*\n\n\n\*\*\*\n\*\*\*\n\n", '', text, flags=re.MULTILINE)
text = re.sub("\*\*\*\n\*\*\*\n\*\*\*\n\*\*\*\n\n\n\*\*\*\n\*\*\* \n\n", '', text, flags=re.MULTILINE)
text = re.sub("\*\*\*\n\*\*\*\n\*\*\*\n\n\n\*\*\*\n\*\*\*\n\n", '', text, flags=re.MULTILINE)