zhengchun

Results 63 comments of zhengchun

Add `if query != nil {}` to avoid throw a query is nil exception before `println(query.Data)`

Sorry. In parse processing, we using https://pkg.go.dev/encoding/xml#NewDecoder to parsing, no extract additional method to check the input document whether is XML or JSON.

Hi everyone, I found a solution how to highlight multiple search keywords that using `document.createTreeWalker()` and `document.createRange()`, this method without use `position` of terms. You can visit this demo site...

you can make a middleware to sets request header, like `Compression` middleware. https://github.com/antchfx/antch/blob/master/compression.go

It's very simple, just call `UseProxy()` method. ```go crawler := &antch.Crawler{} proxyURL, _:= url.Parse("https://127.0.0.1:8080") crawler.UseProxy(proxyURL) ``` proxy middle supported `http, https, socks5 `. https://godoc.org/github.com/antchfx/antch#Crawler.UseProxy

```go func main() { startURLs := []string{ "http://dmoztools.net/Computers/Programming/Languages/Python/Books/", "http://dmoztools.net/Computers/Programming/Languages/Python/Resources/", } quitCh := make(chan struct{}) crawler := &antch.Crawler{Exit: quitCh} spdier := antch.HandlerFunc(func(c chan

Solved. https://github.com/antchfx/xpath/commit/ed2f6ee6ff2a4066b9ea6b35db2868d4d2154cb5

Sorry, I read all the questions or PR, but some of question were not answered in time and then forgot for a long time. I had merged PR #44 that...

in the latest of [xpath v1.2.4](https://github.com/antchfx/xpath/releases/tag/v1.2.4), using `CompileWithNS()` method to pass a prefix and namespaceURL map. It is like the below code: ```go expr, _ := xpath.CompileWithNS("//pd:x", map[string]string{"pd": "http://xmlns.xyz.com/process/2003"}) node...