https://github.com/micartey/grepcon
Get the favicon of a website using a RESTapi
https://github.com/micartey/grepcon
favicon java web
Last synced: 22 days ago
JSON representation
Get the favicon of a website using a RESTapi
- Host: GitHub
- URL: https://github.com/micartey/grepcon
- Owner: micartey
- License: mit
- Created: 2022-10-23T00:34:48.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-12-24T17:00:08.000Z (over 3 years ago)
- Last Synced: 2025-03-16T21:32:56.638Z (over 1 year ago)
- Topics: favicon, java, web
- Language: Java
- Homepage:
- Size: 98.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# grepcon
Introduction •
Getting started •
Troubleshooting
## 📚 Introduction
`grepcon` is a RESTapi to get the favicon from websites. This project was especially made for [nura-pwa](https://github.com/nura-vault/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.
## 📝 Getting started
Using `grepcon` is fairly easy. Firstly, clone the repository and use Docker to build and run the application
```shell
$ docker-compose up
```
Afterwards you can access the api via following RESTapi
```shell
$ 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"
]
```
### Get Image as Response
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}
```
### Current Limitations
- Currently `grepcon` is not checking for resolution
- URLs are not always corrected