forked from MarseyWorld/MarseyWorld
fix this https://rdrama.net/post/18459/marseycapywalking-megathread-for-bugs-and-suggestions/4693984#context
parent
ecf9cd9538
commit
c7b7eb26e1
|
@ -122,7 +122,7 @@ imgur_regex = re.compile(f'(https:\/\/i\.imgur\.com\/[a-z0-9]+)\.({image_regex_e
|
|||
|
||||
giphy_regex = re.compile('(https:\/\/media\.giphy\.com\/media\/[a-z0-9]+\/giphy)\.gif', flags=re.I|re.A)
|
||||
|
||||
youtube_regex = re.compile('(<p>[^<]*)(https:\/\/youtube\.com\/watch\?[\w\-.#&/=?@%+]{7,})', flags=re.I|re.A)
|
||||
youtube_regex = re.compile('((<p>|<img)[^<]*)(https:\/\/youtube\.com\/watch\?[\w\-.#&/=?@%+]{7,})', flags=re.I|re.A)
|
||||
yt_id_regex = re.compile('[\w\-]{5,20}', flags=re.A)
|
||||
|
||||
rumble_regex = re.compile('https://rumble\.com/embed/([a-zA-Z0-9]*)/\?pub=([a-zA-Z0-9]*)',flags=re.I|re.A)
|
||||
|
|
|
@ -511,7 +511,7 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=False, count_emojis
|
|||
if i.group(0) in captured: continue
|
||||
captured.append(i.group(0))
|
||||
|
||||
html = handle_youtube_links(i.group(2))
|
||||
html = handle_youtube_links(i.group(3))
|
||||
if html:
|
||||
sanitized = sanitized.replace(i.group(0), i.group(1) + html)
|
||||
|
||||
|
|
Loading…
Reference in New Issue