This project is a favicon scraper API built with Express. It provides endpoints for getting favicons from a specified URL, retrieving analytics, getting cached icons, and clearing the cache.
And SDK is available here (Source)
The configuration for this project is stored in a TypeScript file named config.ts
. It looks like this:
const config = {
admin: {
password: '',
},
server: {
port: 3000,
},
}
export default config
You can adjust the configuration values as needed for your environment.
-
Get Favicons:
GET /icons?url="yourURL"
-
Get Analytics:
GET /analytics?password="adminPassword"
-
Get Cached Icons:
GET /analytics/cache
-
Clear Cache:
GET /analytics/cache/clear?password="adminPassword"
This project uses Axios for fetching favicons from the specified URL, with Puppeteer as a failover option in case Axios fails.
-
Clone the repository:
git clone https://github.com/yourusername/favicon-scraper-api.git
-
Install dependencies:
npm install
-
Start the server:
npm start
-
Access the API endpoints as described above.
Contributions are welcome! Please create a new branch for your changes and submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.