anilife update 2022.10.23(01.)
This commit is contained in:
@@ -181,43 +181,43 @@ class LogicAniLife(LogicModuleBase):
|
|||||||
import time
|
import time
|
||||||
|
|
||||||
browser_args = [
|
browser_args = [
|
||||||
'--window-size=1300,570',
|
"--window-size=1300,570",
|
||||||
'--window-position=000,000',
|
"--window-position=000,000",
|
||||||
'--disable-dev-shm-usage',
|
"--disable-dev-shm-usage",
|
||||||
'--no-sandbox',
|
"--no-sandbox",
|
||||||
'--disable-web-security',
|
"--disable-web-security",
|
||||||
'--disable-features=site-per-process',
|
"--disable-features=site-per-process",
|
||||||
'--disable-setuid-sandbox',
|
"--disable-setuid-sandbox",
|
||||||
'--disable-accelerated-2d-canvas',
|
"--disable-accelerated-2d-canvas",
|
||||||
'--no-first-run',
|
"--no-first-run",
|
||||||
'--no-zygote',
|
"--no-zygote",
|
||||||
# '--single-process',
|
# '--single-process',
|
||||||
'--disable-gpu',
|
"--disable-gpu",
|
||||||
'--use-gl=egl',
|
"--use-gl=egl",
|
||||||
'--disable-blink-features=AutomationControlled',
|
"--disable-blink-features=AutomationControlled",
|
||||||
'--disable-background-networking',
|
"--disable-background-networking",
|
||||||
'--enable-features=NetworkService,NetworkServiceInProcess',
|
"--enable-features=NetworkService,NetworkServiceInProcess",
|
||||||
'--disable-background-timer-throttling',
|
"--disable-background-timer-throttling",
|
||||||
'--disable-backgrounding-occluded-windows',
|
"--disable-backgrounding-occluded-windows",
|
||||||
'--disable-breakpad',
|
"--disable-breakpad",
|
||||||
'--disable-client-side-phishing-detection',
|
"--disable-client-side-phishing-detection",
|
||||||
'--disable-component-extensions-with-background-pages',
|
"--disable-component-extensions-with-background-pages",
|
||||||
'--disable-default-apps',
|
"--disable-default-apps",
|
||||||
'--disable-extensions',
|
"--disable-extensions",
|
||||||
'--disable-features=Translate',
|
"--disable-features=Translate",
|
||||||
'--disable-hang-monitor',
|
"--disable-hang-monitor",
|
||||||
'--disable-ipc-flooding-protection',
|
"--disable-ipc-flooding-protection",
|
||||||
'--disable-popup-blocking',
|
"--disable-popup-blocking",
|
||||||
'--disable-prompt-on-repost',
|
"--disable-prompt-on-repost",
|
||||||
'--disable-renderer-backgrounding',
|
"--disable-renderer-backgrounding",
|
||||||
'--disable-sync',
|
"--disable-sync",
|
||||||
'--force-color-profile=srgb',
|
"--force-color-profile=srgb",
|
||||||
'--metrics-recording-only',
|
"--metrics-recording-only",
|
||||||
'--enable-automation',
|
"--enable-automation",
|
||||||
'--password-store=basic',
|
"--password-store=basic",
|
||||||
'--use-mock-keychain',
|
"--use-mock-keychain",
|
||||||
'--hide-scrollbars',
|
"--hide-scrollbars",
|
||||||
'--mute-audio'
|
"--mute-audio",
|
||||||
]
|
]
|
||||||
# scraper = cloudscraper.create_scraper(
|
# scraper = cloudscraper.create_scraper(
|
||||||
# browser={"browser": "chrome", "platform": "windows", "desktop": True},
|
# browser={"browser": "chrome", "platform": "windows", "desktop": True},
|
||||||
@@ -246,11 +246,19 @@ class LogicAniLife(LogicModuleBase):
|
|||||||
|
|
||||||
async with async_playwright() as p:
|
async with async_playwright() as p:
|
||||||
if engine == "chrome":
|
if engine == "chrome":
|
||||||
browser = await p.chromium.launch(channel="chrome", args=browser_args, headless=headless)
|
browser = await p.chromium.launch(
|
||||||
|
channel="chrome", args=browser_args, headless=headless
|
||||||
|
)
|
||||||
elif engine == "webkit":
|
elif engine == "webkit":
|
||||||
browser = await p.webkit.launch(headless=headless, args=browser_args,)
|
browser = await p.webkit.launch(
|
||||||
|
headless=headless,
|
||||||
|
args=browser_args,
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
browser = await p.firefox.launch(headless=headless, args=browser_args,)
|
browser = await p.firefox.launch(
|
||||||
|
headless=headless,
|
||||||
|
args=browser_args,
|
||||||
|
)
|
||||||
# context = browser.new_context(
|
# context = browser.new_context(
|
||||||
# user_agent=ua,
|
# user_agent=ua,
|
||||||
# )
|
# )
|
||||||
|
|||||||
Reference in New Issue
Block a user