forked from MarseyWorld/MarseyWorld
dont execute image_sub_regex in code or links
parent
133c3b9ac3
commit
1977941bb3
|
@ -112,7 +112,7 @@ audio_regex_extensions = '|'.join(AUDIO_FORMATS)
|
|||
audio_sub_regex = re.compile(f'(?<!")(https:\/\/({hosts})\/[\w:~,()\-.#&\/=?@%;+]*?\.({audio_regex_extensions}))' + NOT_IN_CODE_OR_LINKS, flags=re.A)
|
||||
|
||||
image_regex_extensions = '|'.join(IMAGE_FORMATS)
|
||||
image_sub_regex = re.compile(f'(?<!")(https:\/\/[\w\-.#&/=\?@%;+,:]{{5,250}}(\.|\?format=)({image_regex_extensions})((\?|&)[\w\-.#&/=\?@%;+,:]*)?)(?=$|\s)', flags=re.I|re.A)
|
||||
image_sub_regex = re.compile(f'(?<!")(https:\/\/[\w\-.#&/=\?@%;+,:]{{5,250}}(\.|\?format=)({image_regex_extensions})((\?|&)[\w\-.#&/=\?@%;+,:]*)?)(?=$|\s)' + NOT_IN_CODE_OR_LINKS, flags=re.I|re.A)
|
||||
|
||||
image_regex_extensions_no_gif = image_regex_extensions.replace('|gif', '')
|
||||
imgur_regex = re.compile(f'(https:\/\/i\.imgur\.com\/[a-z0-9]+)\.({image_regex_extensions_no_gif})', flags=re.I|re.A)
|
||||
|
|
Loading…
Reference in New Issue