Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Runtime error] - invalid memory address or nil pointer dereference #29

Closed
imthaghost opened this issue May 7, 2020 · 1 comment
Closed

Comments

@imthaghost
Copy link

imthaghost commented May 7, 2020

Screen Shot 2020-05-07 at 12 48 04 PM

How to replicate

XPath := "//*[@id=\"market-summary\"]/div[2]/div/div[1]/div[1]"

doc, err := htmlquery.LoadURL("https://stockx.com/air-jordan-1-retro-high-off-white-university-blue")
if err != nil {
panic(err)
}

s2 := htmlquery.FindOne(doc, XPath)

p := string(htmlquery.InnerText(s2))

return p
@zhengchun
Copy link
Contributor

I tested and can works on the latest version of htmlquery. Update the htmlquery dependency package xpath to the latest version 1.1.6

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

No branches or pull requests

2 participants