{"id":13413953,"url":"https://github.com/bobg/htree","last_synced_at":"2026-01-12T01:03:52.394Z","repository":{"id":57500237,"uuid":"208064931","full_name":"bobg/htree","owner":"bobg","description":"Tools for working with trees of html.Nodes.","archived":false,"fork":false,"pushed_at":"2024-01-27T21:13:26.000Z","size":90,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-07-31T20:53:11.191Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://godoc.org/github.com/bobg/htree","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bobg.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-09-12T14:02:35.000Z","updated_at":"2024-02-20T09:59:40.000Z","dependencies_parsed_at":"2024-01-27T22:26:22.569Z","dependency_job_id":"d33e12fb-2a0a-40ef-b518-b5aac9d59503","html_url":"https://github.com/bobg/htree","commit_stats":{"total_commits":7,"total_committers":2,"mean_commits":3.5,"dds":0.1428571428571429,"last_synced_commit":"2b3f863aafa14798572d96dc08e97a489c5b407d"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/bobg/htree","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bobg%2Fhtree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bobg%2Fhtree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bobg%2Fhtree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bobg%2Fhtree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bobg","download_url":"https://codeload.github.com/bobg/htree/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bobg%2Fhtree/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28330178,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"ssl_error","status_checked_at":"2026-01-12T00:36:15.229Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T20:01:53.555Z","updated_at":"2026-01-12T01:03:52.369Z","avatar_url":"https://github.com/bobg.png","language":"HTML","readme":"# Htree - Go package for working with html.Node trees\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/bobg/htree/v2.svg)](https://pkg.go.dev/github.com/bobg/htree/v2)\n[![Go Report Card](https://goreportcard.com/badge/github.com/bobg/htree/v2)](https://goreportcard.com/report/github.com/bobg/htree/v2)\n[![Tests](https://github.com/bobg/htree/actions/workflows/go.yml/badge.svg)](https://github.com/bobg/htree/actions/workflows/go.yml)\n[![Coverage Status](https://coveralls.io/repos/github/bobg/htree/badge.svg?branch=master)](https://coveralls.io/github/bobg/htree?branch=master)\n[![Mentioned in Awesome Go](https://awesome.re/mentioned-badge.svg)](https://github.com/avelino/awesome-go)\n\nThis is htree,\na Go package that helps traverse, navigate, filter, and otherwise process trees of [html.Node](https://pkg.go.dev/golang.org/x/net/html#Node) objects.\n\n## Usage\n\n```go\nroot, err := html.Parse(input)\nif err != nil { ... }\n\nbody := htree.FindEl(root, func(n *html.Node) bool {\n  return n.DataAtom == atom.Body\n})\n\ncontent := htree.FindEl(body, func(n *html.Node) bool {\n  return n.DataAtom == atom.Div \u0026\u0026 htree.ElClassContains(n, \"content\")\n})\n\n...etc...\n```\n","funding_links":[],"categories":["Text Processing","文本处理","Template Engines"],"sub_categories":["Markup Languages","标记语言"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbobg%2Fhtree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbobg%2Fhtree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbobg%2Fhtree/lists"}