pyppeteer

Pyppeteer how to login on page with type

百般思念 提交于 2021-01-29 17:17:57
问题 I was using selenium + chrome driver for my python telegram bot deployed on linux server with docker. Everything is working, but its not supporting async so my app can't do anything else during scrapping. I heard about Pyppeteer, but having some troubles with getting page i need to scrape. Webpage requires me to login. Here are steps: Open page. Click on auth button: <button class="btn btn-outline-warning kt-font-dark mr-2" type="button" id="btn_auth"> <i class="fa fa-key"></i> Enter </button

Pyppeteer: Browser closed unexpectedly in AWS Lambda

岁酱吖の 提交于 2020-08-05 16:47:00
问题 I'm running into this error in AWS Lambda. It appears that the devtools websocket is not up. Not sure how to fix it. Any ideas? Thanks for your time. Exception originated from get_ws_endpoint() due to websocket response timeout https://github.com/pyppeteer/pyppeteer/blob/ad3a0a7da221a04425cbf0cc92e50e93883b077b/pyppeteer/launcher.py#L225 Lambda code: import os import json import asyncio import logging import boto3 import pyppeteer from pyppeteer import launch logger = logging.getLogger()

Pyppeteer: Browser closed unexpectedly in AWS Lambda

本秂侑毒 提交于 2020-08-05 16:42:27
问题 I'm running into this error in AWS Lambda. It appears that the devtools websocket is not up. Not sure how to fix it. Any ideas? Thanks for your time. Exception originated from get_ws_endpoint() due to websocket response timeout https://github.com/pyppeteer/pyppeteer/blob/ad3a0a7da221a04425cbf0cc92e50e93883b077b/pyppeteer/launcher.py#L225 Lambda code: import os import json import asyncio import logging import boto3 import pyppeteer from pyppeteer import launch logger = logging.getLogger()

Pyppeteer: Browser closed unexpectedly in AWS Lambda

Deadly 提交于 2020-08-05 16:40:34
问题 I'm running into this error in AWS Lambda. It appears that the devtools websocket is not up. Not sure how to fix it. Any ideas? Thanks for your time. Exception originated from get_ws_endpoint() due to websocket response timeout https://github.com/pyppeteer/pyppeteer/blob/ad3a0a7da221a04425cbf0cc92e50e93883b077b/pyppeteer/launcher.py#L225 Lambda code: import os import json import asyncio import logging import boto3 import pyppeteer from pyppeteer import launch logger = logging.getLogger()

Scraping content using pyppeteer in association with asyncio

*爱你&永不变心* 提交于 2020-06-28 02:49:05
问题 I've written a script in python in combination with pyppeteer along with asyncio to scrape the links of different posts from its landing page and eventually get the title of each post by tracking the url leading to its inner page. The content I parsed here are not dynamic ones. However, I made use of pyppeteer and asyncio to see how efficiently it performs asynchronously . The following script goes well for some moments but then enounters an error: File "C:\Users\asyncio\tasks.py", line 526,

Python pyppeteer proxy usage

倾然丶 夕夏残阳落幕 提交于 2020-06-17 02:37:26
问题 I want to run chromium browser using auth proxy. I have this code, but chromium does not connect via the proxy. Any suggestions please? import asyncio from pyppeteer import launch async def main(): browser = await launch({'http_proxy': 'ip:port', 'headless': False }) page = await browser.newPage() await page.goto('https://www.myip.com/') await page.authenticate({'username': 'user', 'password': 'passw'}) input() await browser.close() asyncio.get_event_loop().run_until_complete(main()) EDIT:

Python pyppeteer proxy usage

老子叫甜甜 提交于 2020-06-17 02:37:09
问题 I want to run chromium browser using auth proxy. I have this code, but chromium does not connect via the proxy. Any suggestions please? import asyncio from pyppeteer import launch async def main(): browser = await launch({'http_proxy': 'ip:port', 'headless': False }) page = await browser.newPage() await page.goto('https://www.myip.com/') await page.authenticate({'username': 'user', 'password': 'passw'}) input() await browser.close() asyncio.get_event_loop().run_until_complete(main()) EDIT:

Running pypupeteer in FLASK gives ValueError: signal only works in main thread

社会主义新天地 提交于 2020-05-27 04:58:05
问题 I am trying to integrate pyppeteer in a flask app. I have python script that runs pyppeteer and takes a screenshot of a page.This is working file if I run the script individually. The PROBLEM is the same script does not work when i run it in a FLASK APP. I get the following error : loop.run_until_complete(capture(url, 123123)) File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/ Versions/3.7/lib/python3.7/asyncio/base_events.py", line 568, in run_until_complete return future