10 releases
0.5.3 | Jan 14, 2024 |
---|---|
0.5.2 | Oct 7, 2022 |
0.5.0 | Oct 23, 2021 |
0.4.2 | Mar 27, 2021 |
0.3.0 | May 19, 2018 |
#23 in #standards
21 downloads per month
Used in 2 crates
14KB
218 lines
THIS PROJECT MOVED TO GITLAB
https://gitlab.com/radiobrowser/libraries/website-icon-extract-rust
lib.rs
:
This library connects to a given url and tries to find references to icons that represent the page. Multiple standards are used for this:
- default favicon.ico in root and as "link rel" wikipedia.org/wiki/Favicon
- apple touch icon Apple docs
- Open graph image ogp.me
- Windows 8 tile images Microsoft technet
All images are converted to absolute urls and checked if connecting to them works. They get analyzed for pixel size and only the necessary bytes are downloaded for that to happen.
Example
let url = "https://google.com";
let list = ImageLink::from_website(url, "TEST", 5).unwrap();
println("{:?}", list);
Dependencies
~4–16MB
~234K SLoC