forked from rDrama/rDrama
sdf
parent
80fc79cbe3
commit
c5413e9e53
|
@ -936,7 +936,7 @@ image_check_regex = re.compile(f'!\[\]\(((?!(https:\/\/([a-z0-9-]+\.)*({hosts})\
|
||||||
embed_fullmatch_regex = re.compile(f'https:\/\/([a-z0-9-]+\.)*({hosts})\/[\w:~,()\-.#&\/=?@%;+]*', flags=re.A)
|
embed_fullmatch_regex = re.compile(f'https:\/\/([a-z0-9-]+\.)*({hosts})\/[\w:~,()\-.#&\/=?@%;+]*', flags=re.A)
|
||||||
|
|
||||||
video_sub_regex = re.compile(f'(<p>[^<]*)(https:\/\/([a-z0-9-]+\.)*({hosts})\/[\w:~,()\-.#&\/=?@%;+]*?\.(mp4|webm|mov))', flags=re.A)
|
video_sub_regex = re.compile(f'(<p>[^<]*)(https:\/\/([a-z0-9-]+\.)*({hosts})\/[\w:~,()\-.#&\/=?@%;+]*?\.(mp4|webm|mov))', flags=re.A)
|
||||||
audio_sub_regex = re.compile(f'(<p>[^<]*)(https:\/\/([a-z0-9-]+\.)*({hosts})\/[\w:~,()\-.#&\/=?@%;+]*?\.(mp3|wav|ogg|aac))', flags=re.A)
|
audio_sub_regex = re.compile(f'(<p>[^<]*)(https:\/\/([a-z0-9-]+\.)*({hosts})\/[\w:~,()\-.#&\/=?@%;+]*?\.(mp3|wav|ogg|aac|m4a))', flags=re.A)
|
||||||
|
|
||||||
imgur_regex = re.compile('(https://i\.imgur\.com/([a-z0-9]+))\.(jpg|png|jpeg|webp)(?!<\/(code|pre|a)>)', flags=re.I|re.A)
|
imgur_regex = re.compile('(https://i\.imgur\.com/([a-z0-9]+))\.(jpg|png|jpeg|webp)(?!<\/(code|pre|a)>)', flags=re.I|re.A)
|
||||||
|
|
||||||
|
|
|
@ -23,9 +23,6 @@ def process_video(file):
|
||||||
name = f'/videos/{time.time()}'.replace('.','')
|
name = f'/videos/{time.time()}'.replace('.','')
|
||||||
file.save(name)
|
file.save(name)
|
||||||
|
|
||||||
if SITE_NAME == 'rDrama' and file.content_type == 'video/webm':
|
|
||||||
spider = os.system(f'ffmpeg -y -loglevel warning -i {name} -map_metadata -1 {name}.mp4')
|
|
||||||
else:
|
|
||||||
spider = os.system(f'ffmpeg -y -loglevel warning -i {name} -map_metadata -1 -c:v copy -c:a copy {name}.mp4')
|
spider = os.system(f'ffmpeg -y -loglevel warning -i {name} -map_metadata -1 -c:v copy -c:a copy {name}.mp4')
|
||||||
|
|
||||||
if spider: print(f'ffmpeg returned {spider}', flush=True)
|
if spider: print(f'ffmpeg returned {spider}', flush=True)
|
||||||
|
|
Loading…
Reference in New Issue