Questions tagged [pyppeteer]

Unofficial Python port of puppeteer JavaScript (headless) chrome/chromium browser automation library.

Unofficial Python port of puppeteer JavaScript (headless) chrome/chromium browser automation library.


Pyppeteer is mostly used for:

  1. Generate screenshots and PDFs of pages.
  2. Crawl an SPA and generate pre-rendered content (i.e. "SSR").
  3. Scrape content from websites.
  4. Automate form submission, UI testing, keyboard input, etc.
  5. Create an up-to-date, automated testing environment. Run your tests directly in the latest version of Chrome using the latest JavaScript and browser features.
  6. Capture a timeline trace of your site to help diagnose performance issues.

Resources:

Differences from puppeteer

185 questions
0
votes
0 answers

Why Dialog popup Alert doesn't dismiss as they claim by using PyPpeteer class?

After developers of PyPpeteer claims how to handle Dialog and Alert box after them this should be the code which close and dismiss if you want cancel the Dialog.page.on('dialog', lambda dialog: asyncio.ensure_future(close_dialog(dialog)))await…
0
votes
1 answer

Why Pyppeteer Python is unable to load extension?

I use instead of chromium real browser called Brave. Pyppeteer is however not able to load any extension from any profile I do which is I think a big problem, I have C# or .NET puppeteer or puppeteersharp and I have no issue at all so I checked the…
0
votes
0 answers

How to click on a button containing desired text with pyppeteer?

I'm new to Pyppeteer (and programming in general) and I'm trying to get pyppeteer to click on the right buttons on a calendar so I need it to detect the button with the correct month. From what I've googled, I can use this code to find the right…
0
votes
1 answer

Why is Pyppeteer not working for getting HTML "generated" by Solid.js?

I am trying to get the hole content of a website, which is using Solid.js. But I am not able to get the content "generated" by Solid.js. Until now I tried: from pyppeteer import launch async def main(): browser = await launch() page = await…
Flori
  • 37
  • 2
0
votes
0 answers

pyppeteer takes too long to scrape a page running on aws lambda

Is there a way to optimize page scrapping using pyppeteer? My below code sometimes takes more than 20s to scrape page. launch( executablePath=path, handleSIGINT=False, handleSIGTERM=False, …
ALTAF HUSSAIN
  • 205
  • 2
  • 13
0
votes
0 answers

Why error about future exist in my code writed on pyppeteer

# https://bot.sannysoft.com/ from pyppeteer import * from pyppeteer_stealth import stealth import asyncio # -------------------------------------------------------------- def handle_price(some_price): for element in some_price: try: …
0
votes
0 answers

Pyppeteer text box issue

I am using following code to create mhtml file of websites and the text boxes are not clickable in the mhtml files thus created : from pyppeteer import launch import time browser = await…
0
votes
2 answers

pyppeteer: page.click and page.waitForNavigation issues while going through multiple pages

I'm learning puppeteer in JavaScript and following a book and some documentation and tutorials found online. I found a good tutorial going through multiple pages of a famous online shop and saving the items in a file. The JavaScript code I wrote…
arzak
  • 43
  • 5
0
votes
0 answers

Python pyppeteer pre-launch

I've got pyppeteer working, but I'd like to make it so that instead of the browser connecting or launching each time a request is made, an existing connection is used to browse to a page. What I have so far is an http server that, on each GET…
ThreepE0
  • 96
  • 1
  • 5
0
votes
0 answers

How to wait for a page to completely load?

I want to use pyppeteer to open a webpage, wait for the search box to appear, fill in a search query, submit and wait for the new page's content (obtained after clicking the submit button) to appear. I have tried using the following code with…
SUNITA GUPTA
  • 121
  • 4
0
votes
0 answers

Bot detection problem pyppeteer/selenium (Python)

I would like to create my own Nike SNKRS bot. I was trying to make it using selenium library with selenium-stealth and I got stucked on a Nike login page. After that, I was trying to do this by pyppeteer library with pyppeteer stealth plugin and…
0
votes
0 answers

How to decode this -response': {'opcode': 2, 'mask': False, 'payloadData': ' \x02\x00\x00'}}

I am using pyppeteer to get live websocket data from a chat group. I want to read messages. But it gives me this - {'requestId': '1000017108.158', 'timestamp': 23400.782865, 'response': {'opcode': 2, 'mask': False, 'payloadData': '…
0
votes
0 answers

How to enable video captions with py/puppeteer

I am using pyppeteer, the unofficial Python port of puppeteer (since I don't deal a lot with Javascript). However, I realize puppeteer is more popular and would also appreciate pure Javascript answers. I launch a puppeteer browser context, and…
whoami
  • 85
  • 1
  • 7
0
votes
0 answers

How to download webage as pdf using python

I want to download webpage as pdf using python. Given parameter is url and desired filename. I want to downlaod it from any browser if it is possible. import re from pyppeteer import launch from pyppeteer.errors import PageError, TimeoutError,…
sudojarvis
  • 37
  • 5
0
votes
0 answers

Use same fontFamily but render different font , between headless and not-headless

I use same fontFamily, but it renders different font between headless and not-headless, It's easy to be detected that I'm using headless chrome This is All my code: from pyppeteer import launch import asyncio async def init_browser(): …