Hdmovies4u.foo-showtime.s01.e01.07.webrip.720p.... Guide

{ 'source_site': 'HDMovies4u', 'show_name': 'Foo-Showtime', 'season': 1, 'episode': 1, 'quality': '720p', 'raw_extra': '07.WebRip' } Note: The trailing .... in your example suggests incomplete numbering or a typo — the above handles E01.07 as episode 01 with extra 07 likely meaning episode 7 or part 2, but standard scene naming uses E01 only. If you meant something else by (like a search feature, recommendation, auto-tagging, etc.), please clarify and I can tailor the solution.

if not match: return None

return { "source_site": "HDMovies4u", "show_name": match.group("show").replace(".", " "), "season": int(match.group("season")), "episode": int(match.group("episode")), "quality": match.group("quality"), "raw_extra": match.group("extra") } filename = "HDMovies4u.Foo-Showtime.S01.E01.07.WebRip.720p...." parsed = parse_hdmovies4u_filename(filename) print(parsed) HDMovies4u.Foo-Showtime.S01.E01.07.WebRip.720p....

It looks like you’re trying to generate or parse a filename pattern for a TV show episode — specifically for a hypothetical site and a show called "Foo-Showtime" . if not match: return None return { "source_site":