From 492611a15f4d9d5b22c38df49adf22e77524dba0 Mon Sep 17 00:00:00 2001 From: projectdx Date: Sun, 15 May 2022 17:39:57 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=B8=ED=94=84=EB=9F=B0=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=EB=AA=85=20=EB=B3=80=EA=B2=BD=20=ED=85=8C=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logic_inflearn.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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"]