{"id":22400938,"url":"https://github.com/samdenty/site_icons","last_synced_at":"2025-07-01T06:38:41.104Z","repository":{"id":40462274,"uuid":"334121588","full_name":"samdenty/site_icons","owner":"samdenty","description":"Efficient website icon scraper for rust, with sizes, ordering, and WASM support","archived":false,"fork":false,"pushed_at":"2023-09-15T13:30:11.000Z","size":180,"stargazers_count":31,"open_issues_count":2,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-11-26T21:15:13.821Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/samdenty.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-01-29T11:12:59.000Z","updated_at":"2024-10-19T17:05:59.000Z","dependencies_parsed_at":"2024-02-18T00:31:45.213Z","dependency_job_id":"2d5c0af9-c85a-403d-b0c1-a25cf42330ae","html_url":"https://github.com/samdenty/site_icons","commit_stats":{"total_commits":87,"total_committers":4,"mean_commits":21.75,"dds":0.05747126436781613,"last_synced_commit":"9e41e65c45515aef26ed62da4706cad7d063b9b9"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdenty%2Fsite_icons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdenty%2Fsite_icons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdenty%2Fsite_icons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdenty%2Fsite_icons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samdenty","download_url":"https://codeload.github.com/samdenty/site_icons/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228258291,"owners_count":17892657,"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":[],"created_at":"2024-12-05T08:17:25.750Z","updated_at":"2024-12-05T08:17:26.878Z","avatar_url":"https://github.com/samdenty.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# site_icons\n\n[![Crates.io](https://img.shields.io/crates/v/site_icons.svg)](https://crates.io/crates/site_icons)\n[![Documentation](https://docs.rs/site_icons/badge.svg)](https://docs.rs/site_icons/)\n![GitHub Sponsors](https://img.shields.io/github/sponsors/samdenty?style=social)\n\nAn efficient website icon scraper for rust or command line usage.\n\n## Features\n\n- Super fast!\n- Partially downloads images to find the sizes\n- Can extract a site logo `\u003cimg\u003e` using a weighing system\n- Works with inline-data URIs (and automatically converts `\u003csvg\u003e` to them)\n- Supports WASM (and cloudflare workers)\n\n### Rust usage\n\n```rust\nuse site_icons::SiteIcons;\n\nlet mut icons = SiteIcons::new();\n// scrape the icons from a url\nlet entries = icons.load_website(\"https://github.com\", false).await?;\n\n// entries are sorted from highest to lowest resolution\nfor icon in entries {\n  println!(\"{:?}\", icon)\n}\n```\n\n### Command line usage\n\nFirst install the binary:\n\n```\ncargo install site_icons\n```\n\nthen run either:\n\n\u003cdetails open\u003e\n\u003csummary\u003e\u003cb\u003eFor text output:\u003c/b\u003e\u003c/summary\u003e\n\n\u003cblockquote\u003e\n\nCommand:\n\n```bash\nsite-icons https://github.com\n```\n\nOutput:\n\n```\nhttps://github.githubassets.com/favicons/favicon.svg site_favicon svg\nhttps://github.githubassets.com/app-icon-512.png app_icon png 512x512\nhttps://github.githubassets.com/apple-touch-icon-180x180.png app_icon png 180x180\n```\n\n\u003c/blockquote\u003e\n\n\u003c/details\u003e\n\n\u003cdetails open\u003e\n\u003csummary\u003e\u003cb\u003eFor JSON output:\u003c/b\u003e\u003c/summary\u003e\n\n\u003cblockquote\u003e\n\nCommand:\n\n```bash\nsite-icons https://reactjs.org --json\n```\n\nOutput:\n\n```json\n[\n  {\n    \"url\": \"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ii0xMS41IC0xMC4yMzE3NCAyMyAyMC40NjM0OCI+CiAgPHRpdGxlPlJlYWN0IExvZ288L3RpdGxlPgogIDxjaXJjbGUgY3g9IjAiIGN5PSIwIiByPSIyLjA1IiBmaWxsPSIjNjFkYWZiIi8+CiAgPGcgc3Ryb2tlPSIjNjFkYWZiIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiPgogICAgPGVsbGlwc2Ugcng9IjExIiByeT0iNC4yIi8+CiAgICA8ZWxsaXBzZSByeD0iMTEiIHJ5PSI0LjIiIHRyYW5zZm9ybT0icm90YXRlKDYwKSIvPgogICAgPGVsbGlwc2Ugcng9IjExIiByeT0iNC4yIiB0cmFuc2Zvcm09InJvdGF0ZSgxMjApIi8+CiAgPC9nPgo8L3N2Zz4K\",\n    \"headers\": {},\n    \"kind\": \"site_logo\",\n    \"type\": \"svg\",\n    \"size\": null\n  },\n  {\n    \"url\": \"https://reactjs.org/icons/icon-512x512.png?v=f4d46f030265b4c48a05c999b8d93791\",\n    \"headers\": {},\n    \"kind\": \"app_icon\",\n    \"type\": \"png\",\n    \"size\": \"512x512\"\n  },\n  {\n    \"url\": \"https://reactjs.org/favicon.ico\",\n    \"headers\": {},\n    \"kind\": \"site_favicon\",\n    \"type\": \"ico\",\n    \"sizes\": [\"64x64\", \"32x32\", \"24x24\", \"16x16\"]\n  },\n  {\n    \"url\": \"https://reactjs.org/favicon-32x32.png?v=f4d46f030265b4c48a05c999b8d93791\",\n    \"headers\": {},\n    \"kind\": \"site_favicon\",\n    \"type\": \"png\",\n    \"size\": \"32x32\"\n  }\n]\n```\n\n\u003c/blockquote\u003e\n\n\u003c/details\u003e\n\n### Sources\n\n- HTML favicon tag (or looking for default `/favicon.svg` / `/favicon.ico`)\n- [Web app manifest](https://developer.mozilla.org/en-US/docs/Web/Manifest) [`icons`](https://developer.mozilla.org/en-US/docs/Web/Manifest/icons) field\n- `\u003cimg\u003e` tags on the page, directly inside the header OR with a `src|alt|class` containing the text \"logo\"\n\n## Running locally\n\n```bash\ngit clone https://github.com/samdenty/site_icons\ncd site_icons\ncargo run https://github.com\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamdenty%2Fsite_icons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamdenty%2Fsite_icons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamdenty%2Fsite_icons/lists"}