0

I use python and pyppeteer to craw web page and stucked.

A page with 2 Drop down boxs A and B. B's select item is based on A's selection (items retrieved dynamic).

my code list list below but do not work

await page.select("select#ListA", "ItemA")
await page.waitFor(1000)
await page.select("select#ListB", "ItemA1")       
await page.waitFor(1000)

I have tried either await page.waitForNavigation() or page.waitForSelector() , but all fails.

Did I missing anything ?

Any comment are appreciate !

  • it'll help if you could share an image or gif to showcase your issue. it won't be easy to figure out what is wrong from your question. – Pbd May 03 '20 at 10:10
  • 1
    I will try Matt M. suggestion to launch in headless mode later. Thanks Pbd ! – zoe kuo May 06 '20 at 06:18

1 Answers1

0

It's hard to tell without seeing the website, but it's possible that your code fails because of the old version Chrome that pyppeteer specifies. You may want to try out pyppeteer2 (disclaimer: I'm one of the main developers), which is working to update the years abandoned library.

Another thing you could try is launching in headless mode and see exactly what is happening.

Mattwmaster58
  • 2,266
  • 3
  • 23
  • 36
  • I have try the pyppeteer2 and download the newest version, but fail the same, and I will try launching in headless mode later. Anyway thanks Matt M for your response. – zoe kuo May 06 '20 at 06:15
  • At time of writing, the `pup2.1.1` branch is far more updated. As a last resort you could try installing it: `pip install git+https://github.com/pyppeteer/pyppeteer2@pup2.1.1` – Mattwmaster58 May 06 '20 at 18:19