This commit is contained in:
2022-05-22 15:13:31 +09:00
parent 60fbb7a507
commit b5a56d8560

View File

@@ -661,7 +661,7 @@ class Ohli24QueueEntity(FfmpegQueueEntity):
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Whale/3.12.129.46 Safari/537.36",
}
logger.debug("make_episode_info()::url==> %s", url)
logger.info("self.info:::> %s", self.info)
logger.info(f"self.info:::> {self.info}")
text = requests.get(url, headers=headers).text
# logger.debug(text)
@@ -680,7 +680,7 @@ class Ohli24QueueEntity(FfmpegQueueEntity):
iframe_src = soup2.find("iframe")["src"]
# print(resp1)
logger.debug("iframe_src:::> %s", iframe_src)
logger.debug(f"iframe_src:::> {iframe_src}")
resp1 = requests.get(iframe_src, headers=headers, timeout=600).text
# logger.info('resp1::>> %s', resp1)
@@ -715,18 +715,18 @@ class Ohli24QueueEntity(FfmpegQueueEntity):
# print(m2.group(1))
dict_string = "{" + m2.group(1) + "}"
logger.info("dict_string::> %s", dict_string)
logger.info(f"dict_string::> {dict_string}")
tracks = json.loads(dict_string)
self.srt_url = tracks["tracks"][0]["file"]
logger.debug("srt_url::: %s", tracks["tracks"][0]["file"])
logger.debug(f'srt_url::: {tracks["tracks"][0]["file"]}')
video_hash = iframe_src.split("/")
video_hashcode = re.sub(r"index\.php\?data=", "", video_hash[-1])
self._vi = video_hashcode
video_info_url = f"{video_hash[0]}//{video_hash[2]}/player/index.php?data={video_hashcode}&do=getVideo"
# print('hash:::', video_hash)
logger.debug("video_info_url::: %s", video_info_url)
logger.debug(f"video_info_url::: {video_info_url}")
headers = {
"referer": f"{iframe_src}",
@@ -748,7 +748,7 @@ class Ohli24QueueEntity(FfmpegQueueEntity):
logger.debug("resp2::> %s", resp2)
hls_url = resp2["videoSource"]
logger.debug("video_url::> %s", hls_url)
logger.debug(f"video_url::> {hls_url}")
resp3 = requests.get(hls_url, headers=headers).text
# logger.debug(resp3)
@@ -756,7 +756,7 @@ class Ohli24QueueEntity(FfmpegQueueEntity):
# stream_url = hls_url.split('\n')[-1].strip()
stream_info = resp3.split("\n")[-2:]
# logger.debug('stream_url:: %s', stream_url)
logger.debug("stream_info:: %s", stream_info)
logger.debug(f"stream_info:: {stream_info}")
self.headers = {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) "
"Chrome/71.0.3554.0 Safari/537.36Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
@@ -800,9 +800,9 @@ class Ohli24QueueEntity(FfmpegQueueEntity):
# logger.info('self.content_title:: %s', self.content_title)
self.epi_queue = epi_no
self.filename = Util.change_text_for_use_filename(ret)
logger.info("self.filename::> %s", self.filename)
logger.info(f"self.filename::> {self.filename}")
self.savepath = P.ModelSetting.get("ohli24_download_path")
logger.info("self.savepath::> %s", self.savepath)
logger.info(f"self.savepath::> {self.savepath}")
# TODO: 완결 처리