htmlquery
htmlquery copied to clipboard
htmlquery is golang XPath package for HTML query.
I tried a few expressions with substring-after() and it seems the functions is not being executed at all. Tried to debug func.go and substringIndFunc is being called, returns a callable...
Attr method should allow to use returned value in case attr exists (even for attributes without value) or discard value in case it's missing.
&{0xc000144f50 0xc0001451f0 0xc0001452d0 3 input input [{ type email} { name email} { class form-control unicase-form-control text-input} { id exampleInputEmail1}]} &{0xc0001453b0 0xc000145650 0xc000145730 3 input input [{ type password} {...
Hi there, First of all, thank you for the packages, they're very useful 🚀 I've been having issues with the `position` function and I'm not sure if it's an issue...
For some reason `htmlquery.Find(parse, "/html/body//*")` returns the `body` node too. I've tested that using https://codebeautify.org/Xpath-Tester as well as `$x("/html/body//*")` in the browser console and it doesn't seem to include `body`...
I have problem with this example code: htmlquery.Find(doc, `//tbody/tr//td/div[1]/@title`) and get this error: invalid memory address or nil pointer dereference.... which is true, but I want to manage it to...
👍 I enjoy using your `htmlquery` module. Wonder if there is any way to handle a click event without having to making thing complicated (e.eg using a full-pledged webdriver)
Added the following to `TestXPath` in `query_test.go`: ``` _, err := QueryAll(testDoc, "$test/@attr") ``` I'd expect this to return an error during parsing due to the badly formed xpath. Instead,...
```go package main import ( "fmt" "strings" "github.com/antchfx/htmlquery" ) func main() { s := `foo` doc, err := htmlquery.Parse(strings.NewReader(s)) if err != nil { panic(err) } nodes, err := htmlquery.QueryAll(doc,...