It sounds like you want to create a (e.g., in a script, app, or media server) that handles a file or stream labeled: "the home 480p hdrip"
import re def parse_video_filename(filename): pattern = r'(?P<title>.+?)\s+(?P<resolution>\d3,4p)\s+(?P<source>hdrip|webrip|bluray|dvdrip)' match = re.search(pattern, filename, re.IGNORECASE) if match: return match.groupdict() return None filename = "the home 480p hdrip.mp4" info = parse_video_filename(filename) print(info)
Output:
It sounds like you want to create a (e.g., in a script, app, or media server) that handles a file or stream labeled: "the home 480p hdrip"
import re def parse_video_filename(filename): pattern = r'(?P<title>.+?)\s+(?P<resolution>\d3,4p)\s+(?P<source>hdrip|webrip|bluray|dvdrip)' match = re.search(pattern, filename, re.IGNORECASE) if match: return match.groupdict() return None filename = "the home 480p hdrip.mp4" info = parse_video_filename(filename) print(info)
Output:
Our website is operated by Sara International, a company established under the law of Isle of Man, with registered address at 1-10 Ballanoa Meadow IM4-2HT, Isle Of Man, and having its gaming sublicense issued by Isle of Man e-Gaming and all rights to operate the gaming software worldwide.