GoQuery
bluemonday
GoQuery | bluemonday | |
---|---|---|
11 | 8 | |
14,106 | 3,231 | |
0.6% | 1.1% | |
7.2 | 6.6 | |
22 days ago | 5 months ago | |
Go | Go | |
BSD 3-clause "New" or "Revised" License | BSD 3-clause "New" or "Revised" License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
GoQuery
-
Show HN: Flyscrape – A standalone and scriptable web scraper in Go
Your comment was posted 4 minutes ago. That means you still have enough time to edit your comment to change it so it contains real URLs:
<https://github.com/PuerkitoBio/goquery>
<https://github.com/dop251/goja>
(Please do not reply to this comment—I won't be able to delete it once the previous post is fixed if it contains replies.)
-
Check to see if JSON contains something
How about - https://github.com/PuerkitoBio/goquery
-
Help understanding goquery return value
Assuming you're asking about https://github.com/PuerkitoBio/goquery , to interpret your printout you want to look at what Find is defined to return, a *Selection. https://github.com/PuerkitoBio/goquery/blob/39fb6d4dc47a07e5782494b6defc89a194b1f906/traversal.go#L23
-
Learn how to scrape Trustpilot reviews using Go
github.com/PuerkitoBio/goquery - library that provides a convenient and concise way to query HTML and XML documents. It provides a jQuery-like API for selecting elements and extracting data, making it a popular choice for web scraping in Go.
-
Service for generate RSS/Atom feeds from web pages that lack them.
Yep, I thing I can add it. Add new goquery alternative will be good :)
-
Is there a library similar to HTMLUnit in GO?
If I want to parse the structure of HTML and not interact with it from a browser point of view, I use this in Go: https://github.com/PuerkitoBio/goquery
-
10分钟go crawler colly从入门到精通
goquery
-
I Need to Find an Apartment
I had a similar problem that I solved with goquery and otto. You can use goquery to traverse the DOM and otto to execute the script fragment. Then just grab the data from otto's VM.
Your scraping being slow and using Chrome might be a blessing in disguise though. If you aren't careful you can get detected as a bot and banned from the site.
https://github.com/PuerkitoBio/goquery
-
Static analyzers for text templates
If you're willing to add constraints around the goal, you can catch this type of error with semgrep rules and/or unit tests using qoquery.
-
Building Golang crawler with Docker
RUN go get github.com/PuerkitoBio/goquery
bluemonday
- Don't try to sanitize input. Escape output. (2020)
-
Geomys, a blueprint for a sustainable open-source maintenance firm
I'm really glad to see `bluemonday` in such company, but I'm also really happy to hand over the reigns to a group of engineers that can focus on OSS.
I am the author of https://github.com/microcosm-cc/bluemonday but being a maintainer is a journey, you make a tool for yourself, you realise others will benefit and open it up to others... time passes... and then you realise you are that tiny pillar in the XKCD comic about dependencies, and that when you make a casual update to the project that multiple security companies ping you to ask the impact and scope of the change, implications, and of course others ping you to say that it breaks their individual workflow.
I've known Filippo for almost as long as that library has existed, and I know it's in a safe pair of hands, and that Geomys is going to be a good home to all of the OSS projects that they have in their portfolio.
It's definitely a journey, how should these foundational elements be supported and funded? This is one answer to that question, and I'm glad it exists as my spare cycles were very few.
-
Sponsor the open source projects you depend on
I'm on the receiving end of donations from sourcegraph for this. It's around $10 per month from that single donation and is for the only Go HTML santizer, which you use when you have user generated / untrusted input that you need to display as HTML. https://github.com/microcosm-cc/bluemonday
For me the library has been good enough for my own use for a very very long time. I mostly neglect it unless there's some critical issue. I don't improve it at all as my time is better spent on my day job.
I've often thought that there's room for improvement such as a DOM style santizer to validate input rather than just a SAX style sanitizer, perhaps formatting of output in addition to sanitising input, transformation rules, etc.
When I got the donation I was surprised, first ever bit of support for open source software I'd written (as this was not written on company dime).
Even at $10 per month it's motivating enough to think someone values it. If it accrues into something significant I may actually feel motivated to improve it.
Interesting is that I'd regard this as successful by usage, it's used by virtually everything in the Go world that makes a website.
Perhaps people don't know it exists though? And for that awareness thanks to thanks.dev
-
How to secure POST API endpoint getting rich text editor HTML string
bluemonday is an html sanitizer you could try
-
Does anyone know of an HTML parser that would allow me to manipulate the HMTL? Namely I'm interested in stripping all attributes from strings.
For sanitizing html input at work we use https://github.com/microcosm-cc/bluemonday.
- Bluemonday: A fast Golang HTML sanitizer
-
How to validate a string is a valid HTML tag/attribute?
Sounds like a task for bluemonday.
- HTML Sanitizer API
What are some alternatives?
colly - Elegant Scraper and Crawler Framework for Golang
inject
xpath - XPath package for Golang, supports HTML, XML, JSON document query.
go-pkg-xmlx
htmlquery - htmlquery is golang XPath package for HTML query.
mxj - Decode / encode XML to/from map[string]interface{} (or JSON); extract values with dot-notation paths and wildcards. Replaces x2j and j2x packages.
jsonpath - JSONPath with dot notation generator for golang
xml - Package feed implements a flexible, robust and efficient RSS and Atom parser
bbConvert - Converter from BBCode to HTML
goregen - randexp for Go.
sh - A shell parser, formatter, and interpreter with bash support; includes shfmt