From ce13a3e82930d2596917aa12be14e4657858e9ff Mon Sep 17 00:00:00 2001 From: projectdx Date: Sun, 30 Oct 2022 00:14:17 +0900 Subject: [PATCH] ohli24.net update 2022.10.30(01.) --- logic_ohli24.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/logic_ohli24.py b/logic_ohli24.py index 05f796f..cf36901 100644 --- a/logic_ohli24.py +++ b/logic_ohli24.py @@ -1018,13 +1018,13 @@ class Ohli24QueueEntity(FfmpegQueueEntity): iframe_url = match.group(1) logger.info("iframe_url::> %s", iframe_url) - logger.debug(soup1.find("iframe")) + # logger.debug(soup1.find("iframe")) iframe_url = soup1.find("iframe")["src"] - logger.info("iframe_url::> %s", iframe_url) - - print(base_url) - print(iframe_url) + # logger.info("iframe_url::> %s", iframe_url) + # + # logger.debug(base_url) + # logger.debug(iframe_url) # exit() # resp = requests.get(iframe_url, headers=headers, timeout=20).text @@ -1033,10 +1033,10 @@ class Ohli24QueueEntity(FfmpegQueueEntity): iframe_src = iframe_url # print(resp1) - logger.debug(f"iframe_src:::> {iframe_src}") + # logger.debug(f"iframe_src:::> {iframe_src}") resp1 = requests.get(iframe_src, headers=headers, timeout=600).text - # logger.info('resp1::>> %s', resp1) + # logger.info("resp1::>> %s", resp1) soup3 = BeautifulSoup(resp1, "lxml") # packed_pattern = re.compile(r'\\{*(eval.+)*\\}', re.MULTILINE | re.DOTALL) s_pattern = re.compile(r"(eval.+)", re.MULTILINE | re.DOTALL) @@ -1045,14 +1045,17 @@ class Ohli24QueueEntity(FfmpegQueueEntity): ) packed_script = soup3.find("script", text=s_pattern) # packed_script = soup3.find('script') - # logger.info('packed_script>>> %s', packed_script.text) + # logger.info("packed_script>>> %s", packed_script.text) unpack_script = None if packed_script is not None: # logger.debug('zzzzzzzzzzzz') match = packed_pattern.search(packed_script.text) # match = re.search(packed_pattern, packed_script.text) # logger.debug("match::: %s", match.group()) - unpack_script = jsbeautifier.beautify(match.group(3)) + # unpack_script = jsbeautifier.beautify(match.group(3)) + + logger.debug(type(packed_script)) + unpack_script = jsbeautifier.beautify(str(packed_script)) # logger.info('match groups:: %s', match.groups()) # logger.info('match group3:: %s', match.group(3))