(self, common_title)
return int(match.group(1))
Number of the episode
Number of the episode
Number of the episode
def get_episode_number(self, common_title):
        """Number of the episode"""
        if not self.title or not common_title:
            return None

        title = self.title.replace(common_title, "").strip()
        match = re.search(r"^\W*(\d+)", title)
        if not match:
            return None

        return int(match.group(1))
def get_episode_number ( self , common_title ) : if not self . title or not common_title : return None title = self . title . replace ( common_title , "" ) . strip ( ) match = re . search ( r"^\W*(\d+)" , title ) if not match : return None return int ( match . group ( 1 ) )