master
Aevann1 2021-10-10 07:54:32 +02:00
parent a3d55781f8
commit 07d23493f9
1 changed files with 3 additions and 0 deletions

View File

@ -83,7 +83,10 @@ allowed_styles =['color', 'font-weight', 'transform', '-webkit-transform']
def sanitize(sanitized, noimages=False):
print(sanitized)
print('\n\n')
sanitized = sanitized.replace("\ufeff", "").replace("m.youtube.com", "youtube.com").replace("</blockquote></div>", "</blockquote></div><pre></pre>")
print(sanitized)
for i in re.finditer('https://i.imgur.com/(([^_]*?)\.(jpg|png|jpeg))', sanitized):
sanitized = sanitized.replace(i.group(1), i.group(2) + "_d." + i.group(3) + "?maxwidth=9999")