Let’s split the keyword into logical parts:
Likely added by the user or search engine to indicate a newer version, fresh upload, or updated release. sayuri20241080pdmmwebdlh264aac20pencu new
import repattern = re.compile( r'(?P<title>[a-z]+)' r'(?P<year>\d4)' r'(?P<height>\d3,4p)' r'dmmwebdl' r'(?P<vcodec>h264|h265)' r'(?P<acodec>aac|mp3)' r'(?P<fps>\d+)p' r'encu' r'(?P<version>new|old)?' ) Let’s split the keyword into logical parts: Likely
filename = "sayuri20241080pdmmwebdlh264aac20pencu new" match = pattern.search(filename) if match: print(match.groupdict())Output:
Output:
'title': 'sayuri',
'year': '2024',
'height': '1080p',
'vcodec': 'h264',
'acodec': 'aac',
'fps': '20',
'version': 'new'