{"id":23451093,"url":"https://github.com/gpahal/head","last_synced_at":"2025-04-10T10:00:06.814Z","repository":{"id":57574505,"uuid":"272671004","full_name":"gpahal/head","owner":"gpahal","description":"A go library for parsing information in a HTML head tag","archived":false,"fork":false,"pushed_at":"2023-07-22T05:33:57.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T18:51:59.069Z","etag":null,"topics":["go","golang","head","html","html-head","metadata","opengraph","opengraph-tags"],"latest_commit_sha":null,"homepage":"","language":"Go","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/gpahal.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-16T09:51:15.000Z","updated_at":"2023-08-29T14:16:16.000Z","dependencies_parsed_at":"2024-06-20T00:25:42.999Z","dependency_job_id":"187fad1a-c4f9-4d2b-b5b4-e34b1014a9ad","html_url":"https://github.com/gpahal/head","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpahal%2Fhead","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpahal%2Fhead/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpahal%2Fhead/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpahal%2Fhead/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gpahal","download_url":"https://codeload.github.com/gpahal/head/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248198868,"owners_count":21063626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["go","golang","head","html","html-head","metadata","opengraph","opengraph-tags"],"created_at":"2024-12-24T00:18:30.861Z","updated_at":"2025-04-10T10:00:06.792Z","avatar_url":"https://github.com/gpahal.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# head\n\n[![GoDoc](https://godoc.org/github.com/gpahal/head?status.svg)](https://godoc.org/github.com/gpahal/head)\n\nA go library for parsing information in a HTML head tag.\n\n## Installation\n\n```sh\ngo get github.com/gpahal/head\n```\n\n## Usage\n\n### Processing a URL\n\nThe head.ProcessURL function takes a url string and a \\*http.Client, makes a\nGET request to the url using the http client and returns a new \\*head.Object\nfrom the returned HTML. If client is nil, a default client is used.\n\n```go\nobject, err := head.ProcessURL(\"http://ogp.me\", nil)\n```\n\n### Parsing HTML\n\nThe head.ParseHTML function takes an io.Reader, reads HTML, parses the HTML\nand returns a new \\*head.Object.\n\n```go\nresp, _ := http.Get(\"http://ogp.me\")\n// ignoring the error and other response attributes (like status code)\n// for simplicity\ndefer resp.Body.Close()\n\nobject, err := head.ParseHTML(resp.Body)\n```\n\n### Documentation\n\nThe complete API documentation is available on\n[GoDoc](https://godoc.org/github.com/gpahal/head).\n\n\n## License\n\nLicensed under MIT license ([LICENSE](LICENSE) or [opensource.org/licenses/MIT](https://opensource.org/licenses/MIT))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpahal%2Fhead","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgpahal%2Fhead","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpahal%2Fhead/lists"}