Introduction • Getting started • Troubleshooting
grepcon
is a RESTapi to get the favicon from websites. This project was especially made for nura-pwa to eventually replace the unofficial google api which is currently used. The google api sadly doesn't work for many websites and therefore is not sutible for my usecase.
Using grepcon
is fairly easy. Firstly, clone the repository and use Docker to build and run the application
$ docker-compose up
Afterwards you can access the api via following RESTapi
$ curl https://localhost:8080/api/v1/favicon/list?url{URL}?fallback={FALLBACK_URL}
After invoking the endpoint, an array with urls to the different favicons will be returned.
Example:
[
"https://www.google.com/favicon.ico"
]
You can also get an image as an response. This is especially useful for saving images in a serviceworker or prevent cors errors.
$ curl https://localhost:8080/api/v1/favicon?url={URL}?fallback={FALLBACK_URL}
- Currently
grepcon
is not checking for resolution - URLs are not always corrected