From f5d43aabdd389471db6b777963a857d13431be3d Mon Sep 17 00:00:00 2001 From: projectdx Date: Thu, 5 Oct 2023 22:01:35 +0900 Subject: [PATCH] 2023.10.05 (03. ohli24 proxy setting) --- mod_ohli24.py | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/mod_ohli24.py b/mod_ohli24.py index 3f9543a..46d4bbe 100644 --- a/mod_ohli24.py +++ b/mod_ohli24.py @@ -837,7 +837,9 @@ class LogicOhli24(PluginModuleBase): return True @staticmethod - def get_html(url, headers=None, referer=None, stream=False, timeout=5): + def get_html( + url, headers=None, referer=None, stream=False, timeout=10, stealth=False + ): data = "" if headers is None: headers = { @@ -883,7 +885,7 @@ class LogicOhli24(PluginModuleBase): except Exception as e: logger.error("Exception:%s", e) logger.error(traceback.format_exc()) - return data + return response_data ######################################################### def add(self, episode_info): @@ -1133,17 +1135,23 @@ class Ohli24QueueEntity(FfmpegQueueEntity): print(base_url) print(iframe_url) # exit() + iframe_src = f'{P.ModelSetting.get("ohli24_url")}{iframe_url}' - # resp = requests.get(iframe_url, headers=headers, timeout=20).text - # soup2 = BeautifulSoup(resp, "lxml") - # iframe_src = soup2.find("iframe")["src"] - iframe_src = iframe_url - # print(resp1) + iframe_html = LogicOhli24.get_html(iframe_src, headers=headers, timeout=600) + + # print(iframe_html) + pattern = r"