diff --git a/logic_inflearn.py b/logic_inflearn.py index 2cb15c9..1b4f6b1 100755 --- a/logic_inflearn.py +++ b/logic_inflearn.py @@ -863,7 +863,7 @@ class LogicInflearn(object): LogicInflearn.season = "1" # logger.debug(api_url) m3u8_info = LogicInflearn.getM3u8_info( - api_url, LogicInflearn.season, idx + api_url, LogicInflearn.season, idx, main_title ) # print(api_url) # print('type::::', type(m3u8_url)) @@ -933,7 +933,7 @@ class LogicInflearn(object): return data @staticmethod - def getM3u8_info(url, season, idx): + def getM3u8_info(url, season, idx, main_title): data_id = "" m3u8_url = "" name = "" @@ -953,7 +953,9 @@ class LogicInflearn(object): title = res_data["course"]["_"]["current_unit"]["title"] if res_data["newBOX"]["video"]["name"] is not None: name = res_data["newBOX"]["video"]["name"] - filename = f"{title} - S{season.zfill(2)}.E{str(idx).zfill(3)} - {name.split('.')[0]}.{name.split('.')[-1]}" + # filename = f"{title} - S{season.zfill(2)}E{str(idx).zfill(3)} - {name.split('.')[0]}.{name.split( + # '.')[-1]}" + filename = f"{main_title} - S{season.zfill(2)}E{str(idx).zfill(3)} - {title}.{name.split('.')[-1]}" if res_data["newBOX"]["video"]["vod_info"]["hlsUrl"] is not None: # logger.debug(res_data["newBOX"]["video"]["vod_info"]["hlsUrl"]) m3u8_url = res_data["newBOX"]["video"]["vod_info"]["hlsUrl"]