{"id":21281194,"url":"https://github.com/mkfsn/crepe","last_synced_at":"2026-05-21T07:45:34.012Z","repository":{"id":57606853,"uuid":"243894404","full_name":"mkfsn/crepe","owner":"mkfsn","description":null,"archived":false,"fork":false,"pushed_at":"2020-03-08T12:37:18.000Z","size":23,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-22T04:21:37.214Z","etag":null,"topics":["golang","goquery","jquery","struct-tag"],"latest_commit_sha":null,"homepage":"https://godoc.org/github.com/mkfsn/crepe","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mkfsn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-29T02:59:08.000Z","updated_at":"2020-03-08T12:37:21.000Z","dependencies_parsed_at":"2022-08-30T00:00:52.672Z","dependency_job_id":null,"html_url":"https://github.com/mkfsn/crepe","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkfsn%2Fcrepe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkfsn%2Fcrepe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkfsn%2Fcrepe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkfsn%2Fcrepe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mkfsn","download_url":"https://codeload.github.com/mkfsn/crepe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243738969,"owners_count":20340003,"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":["golang","goquery","jquery","struct-tag"],"created_at":"2024-11-21T10:46:00.455Z","updated_at":"2026-05-21T07:45:33.607Z","avatar_url":"https://github.com/mkfsn.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# crepe\n\ncrepe is a tool that helps you extract the data from ~~tons-of-layers~~ HTML in an easier way.\n\nThis uses a brilliant project called [goquery](https://github.com/PuerkitoBio/goquery) to extract the data.\n\n\n# Example\n\nBy specifying some selectors in struct tags, crepe helps you unmarshal the data from HTML.\n\n```go\n\thtml := `\n\t\t\u003cdiv id=\"header\"\u003e\n\t\t\t\u003ch1\u003eEmployees\u003c/h1\u003e\n\t\t\u003c/div\u003e\n\t\t\u003ctable\u003e\u003c/table\u003e\n\t\t\u003ctable\u003e\n\t\t\t\u003ctbody\u003e\n\t\t\t\u003ctr data-id=\"aaaa\" role=\"engineer\"\u003e\n\t\t\t\t\u003ctd\u003eTony\u003c/td\u003e\n\t\t\t\t\u003ctd\u003eMale\u003c/td\u003e\n\t\t\t\t\u003ctd\u003e20\u003c/td\u003e\n\t\t\t\u003c/tr\u003e\n\t\t\t\u003ctr data-id=\"bbbb\" role=\"manager\"\u003e\n\t\t\t\t\u003ctd\u003eMary\u003c/td\u003e\n\t\t\t\t\u003ctd\u003eFemale\u003c/td\u003e\n\t\t\t\t\u003ctd\u003e23\u003c/td\u003e\n\t\t\t\u003c/tr\u003e\n\t\t\t\u003c/tbody\u003e\n\t\t\u003c/table\u003e\n\t`\n\tvar data struct {\n\t\tTitle     string `crepe:\"div#header\u003eh1,text\"`\n\t\tEmployees []*struct {\n\t\t\tId     string `crepe:\"attr=data-id\"`\n\t\t\tName   string `crepe:\"td,:eq(0),text\"`\n\t\t\tGender string `crepe:\"td,:eq(1),text\"`\n\t\t\tAge    int    `crepe:\"td,:eq(2),text\"`\n\t\t\tRole   string `crepe:\"attr=role\"`\n\t\t} `crepe:\"table,:last,tbody\u003etr\"`\n\t}\n\tif err := Unmarshal([]byte(html), \u0026data); err != nil {\n\t\tfmt.Printf(\"error: %v\\n\", err)\n\t\treturn\n\t}\n\tfmt.Printf(\"result: %v\\n\", data)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkfsn%2Fcrepe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmkfsn%2Fcrepe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkfsn%2Fcrepe/lists"}