fix clean string
This commit is contained in:
+2
-4
@@ -1,11 +1,9 @@
|
||||
import imageio
|
||||
import re
|
||||
|
||||
def get_video_metadata(video_path):
|
||||
reader = imageio.get_reader(video_path)
|
||||
return reader.get_meta_data()
|
||||
|
||||
def clean_string(input_string):
|
||||
invalid_chars = ['\\', '/', ':', '*', '?', '"', '<', '>', '|',"#"," ","!"]
|
||||
cleaned_string = ''.join(c if c not in invalid_chars else '_' for c in input_string)
|
||||
cleaned_string = cleaned_string.strip(" .")
|
||||
return cleaned_string
|
||||
return re.sub("[^A-Za-z]", "", s)
|
||||
Reference in New Issue
Block a user