Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Unable to retriev element data #43

Open
Rubycavs opened this issue May 22, 2020 · 1 comment
Open

Unable to retriev element data #43

Rubycavs opened this issue May 22, 2020 · 1 comment

Comments

@Rubycavs
Copy link

Hi, really struggling to extrach one bit of data from this web page.
When inspecting the data element and copy the xPath into the console I get an emprt response when clearly the element has a value of 939.
Any help to explain where I'm going wrong would be most appreciated.
I'm using Puppeteer-extra and stealth
Thanks Chris

xPath

@paramveer1999
Copy link

you can try this

let value=page.$$("classname whose innertext value you want to extract");
suppose this class has length 5 and you want to extract "939" which has class at 3 index so you can do this

let innertext=await (await (value[2].getproperty("innerText")).jsonvalue();

hope this will help you

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants