# 2. Extract Year year_match = re.search(self.year_pattern, clean_name) year = int(year_match.group(1)) if year_match else None
# 5. Extract Title # Logic: Text before the Year is usually the Title title = "Unknown Title" if year_match: potential_title = clean_name[:year_match.start()] # Replace dots/underscores with spaces and clean up title = re.sub(r'[._-]', ' ', potential_title).strip()
# 4. Extract Quality/Source # Combining quality keywords found quality_keywords = re.findall(self.quality_pattern, clean_name, re.IGNORECASE) quality = " ".join(quality_keywords) if quality_keywords else "Unknown"
Www.mallumv.guru - Golam -2024- Malayalam True ... -
# 2. Extract Year year_match = re.search(self.year_pattern, clean_name) year = int(year_match.group(1)) if year_match else None
# 5. Extract Title # Logic: Text before the Year is usually the Title title = "Unknown Title" if year_match: potential_title = clean_name[:year_match.start()] # Replace dots/underscores with spaces and clean up title = re.sub(r'[._-]', ' ', potential_title).strip() www.MalluMv.Guru - Golam -2024- Malayalam TRUE ...
# 4. Extract Quality/Source # Combining quality keywords found quality_keywords = re.findall(self.quality_pattern, clean_name, re.IGNORECASE) quality = " ".join(quality_keywords) if quality_keywords else "Unknown" www.MalluMv.Guru - Golam -2024- Malayalam TRUE ...