anilife update 2022.10.24(01.)

This commit is contained in:
2022-10-24 03:59:32 +09:00
parent 3102ba50ad
commit af73adf1aa

View File

@@ -112,7 +112,9 @@ class LogicAniLife(LogicModuleBase):
default_route_socketio(P, self) default_route_socketio(P, self)
@staticmethod @staticmethod
def get_html(url: str, referer: str = None, stream: bool = False, timeout: int = 5) -> str: def get_html(
url: str, referer: str = None, stream: bool = False, timeout: int = 5
) -> str:
data = "" data = ""
try: try:
print("cloudflare protection bypass ==================") print("cloudflare protection bypass ==================")
@@ -143,7 +145,9 @@ class LogicAniLife(LogicModuleBase):
return data return data
@staticmethod @staticmethod
def get_html_requests(url: str, referer: str = None, stream: str = False, timeout: int = 5) -> str: def get_html_requests(
url: str, referer: str = None, stream: str = False, timeout: int = 5
) -> str:
data = "" data = ""
try: try:
print("get_html_requests ==================") print("get_html_requests ==================")
@@ -173,7 +177,11 @@ class LogicAniLife(LogicModuleBase):
@staticmethod @staticmethod
async def get_html_playwright( async def get_html_playwright(
url: str, headless: bool = False, referer: str = None, engine: str = "chrome", stealth: bool = False url: str,
headless: bool = False,
referer: str = None,
engine: str = "chrome",
stealth: bool = False,
) -> str: ) -> str:
try: try:
from playwright.sync_api import sync_playwright from playwright.sync_api import sync_playwright