goquery
goquery copied to clipboard
A little like that j-thing, only in Go.
```go package main import ( "fmt" "log" "strings" "github.com/PuerkitoBio/goquery" ) func main() { var html = ` text ` doc, err := goquery.NewDocumentFromReader(strings.NewReader(html)) if err != nil { log.Fatalln(err) }...
``` doc, _ := goquery.NewDocumentFromReader(strings.NewReader("")) fmt.Println(doc.Html()) // want // got --> ```
Consider the following program: ```go package main import ( "fmt" "strings" "github.com/PuerkitoBio/goquery" ) const data = `click this link` func main() { d, err := goquery.NewDocumentFromReader(strings.NewReader(data)) if err != nil...
``` //node is a sub html*node of doc // if ok return the select string such as `.sidebar-reviews article .content-block a` sel, ok := doc.FindSelector(node) ``` Could this function be...
Heya! Was playing around with this in a project, and it has been amazing! Noticed the Selection.Map only allowing to return a string, so wanted to change that to generics...
How to achieve the effect of BeautifulSoup get_text? ``` def extract_content(html: str) -> str: soup = BeautifulSoup(html, "html.parser") text = soup.get_text(separator=" ", strip=True) return text
One knock against jquery is it is slower than vanilla javascript. Has anyone ever tried compiling goquery to wasm and running it in the browser? It probably cant manipulate the...
Resolve #482 # What's change - Bump to golang 1.23 - Support `IterEach` Note: Considering that Go 1.23 is not stable yet, I am not sure if merging that PR...
Golang 1.23 will support the `iter` package and define the types `iter.Seq` and `iter.Seq2` as iterators. My idea is that maybe `Each` can return an iterator. Then the user can...
when i import goquery into my func it says error while importing github.com/PuerkitoBio/goquery: package iter is not in std (/usr/local/go/src/iter)compiler