ash-jc-allen / favicon-fetcher Goto Github PK
View Code? Open in Web Editor NEWA Laravel package for fetching favicons from websites.
License: MIT License
A Laravel package for fetching favicons from websites.
License: MIT License
Hi, I'm using the http driver here for fetching favicon. When a favicon can't be retrieved, the HTTP driver seems to wait for a long time which is slowing down my front-end, any chance we can customise the timeout?
Hi, I have tried this package for favicons but on some website have got error, i.e if I try to get icon for that site https://www.smartsupp.com/
Hello,
just idea that would be nice to have image file to display on html page. Or is it possible already somehow?
Hi! First of all, thanks for this great package.
I'm building service which handles 500k+ domains and there are many domains that are not available. When this happens, we will get cURL error for "Could not resolve host".
Any suggestions how to handle this error so that we will get favicon as null?
Thanks!
Hello,
If I run the following code which looks like it should work:
use AshAllenDesign\FaviconFetcher\Facades\Favicon;
Favicon::fetch("https://example.com/")->cache(now()->addWeek())->getFaviconUrl();
It will crash with:
[Error] Call to a member function cache() on null
When the Uri provided to the Scan
function responds with a 301 or 302 redirect, It's not working when the redirect location is a path.
Specifically, I'm having an issue where my local Jellyfin instance is at 192.168.x.x:x, but that address returns a 302 with a location of /web/index.html
. The favicons are then publicly available at 192.168.x.x:x/web/asset.ico
. However, the ScanResult
s will have a location of 192.168.x.x:x/asset.ico
(missing the web
path). The fetch is also returning null, which I believe has the same root issue.
Redirects seem to be handled correctly when it's a different domain (for example, https://youtu.be has some scan results for youtube.com).
Hello,
currently findLinkElement() function pattern is
$pattern = '/<link.*rel="(icon|shortcut icon)"[^>]*>/i';
however this does not work in all cases, because it might assume that this is favicon link:
when we remove dot and asterisk (.*), then it works much better. However, I can not test all possible cases.
$pattern = '/<link rel="(icon|shortcut icon)"[^>]*>/i';
Any ideas why this pattern is how it is?
Hi thanks for this nice package, but I think there is a problem.
When storing the favicon in the storage I got this result :
$favicon = Favicon::fetch('https://headlessui.com')->store('favicons', 'public');
// 6f886546-edc2-4041-9a5c-8803f236ac25.com
$favicon = Favicon::fetch('https://vuejs.org')->store('favicons', 'public');
// favicons/bf4d32f3-fd86-4696-9a01-482d810da7f9.org
$favicon = Favicon::fetch('https://remote.io')->store('favicons', 'public');
// favicons/d0e9c6d4-2cd5-4abd-ac53-2fcad9ff817a.io
The file extension follows the URL domain. that's should not be the case, it should be .png or other image formats.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.