Ten kod se zasekne tak jako tak, na te nekonecne smycce.
volani asyncio.sleep bez await na nic neceka.
tezko rict proc to ze serveru nejde, muze souviset s blacklistovanymi serverovymi IP adresami.
Pokud jsi je zahltil requesty generovanymi tou nekonecnou smyckou bez cekani, je dobra sance, ze te zablokovali.
Ten tazatel na GH to spousti z nejake CI sluzby, tam je take dost velka sance blokace.
Ne, chyba nebyla v tom, že by nebyl dostupný nějaký určitý web, ale nešlo mi vůbec v pyppeteeru otevřít nový tab. Zaseklo se to už na await browser.newPage(). Nicméně nakonec sem vyřešil pomocí minimal args:
minimal_args = [
'--autoplay-policy=user-gesture-required',
'--disable-background-networking',
'--disable-background-timer-throttling',
'--disable-backgrounding-occluded-windows',
'--disable-breakpad',
'--disable-client-side-phishing-detection',
'--disable-component-update',
'--disable-default-apps',
'--disable-dev-shm-usage',
'--disable-domain-reliability',
'--disable-features=AudioServiceOutOfProcess',
'--disable-hang-monitor',
'--disable-ipc-flooding-protection',
'--disable-notifications',
'--disable-offer-store-unmasked-wallet-cards',
'--disable-popup-blocking',
'--disable-print-preview',
'--disable-prompt-on-repost',
'--disable-renderer-backgrounding',
'--disable-setuid-sandbox',
'--disable-speech-api',
'--disable-sync',
'--hide-scrollbars',
'--ignore-gpu-blacklist',
'--metrics-recording-only',
'--mute-audio',
'--no-default-browser-check',
'--no-first-run',
'--no-pings',
'--no-sandbox',
'--no-zygote',
'--password-store=basic',
'--use-gl=swiftshader',
'--use-mock-keychain',
'--allow-insecure-localhost',
];
teď mi to na serveru funguje.
Ale teda musím říct, že moje představy, že to takhle bude rychlejší, se absolutně, absolutně vůbec nenaplnily.
Doteď sem používal selenium, jeden tab a prostě rychle za sebou otevíral, checkoval, zavíral stránky.. Ale otevřenej byl vždycky jen jeden tab. Program top mi ukazoval více spuštěnejch procesů chrome, jak kdy, zhruba 5-7 jich bylo, a load average kolísal kolem 3-6.
Jenže teďka, když teda používám ten pyppeteer, jeden spuštěnej browser a 7 otevřenejch tabů, jejichž zdroják checkuju... Spuštěnejch procesů chrome je nějak o dost víc, asi 15-20, a load average je zhruba 3x vyšší.. resp. kolísá cca mezi 10-20.. ale chvilku byl i 50, lol..