navossoc / KeePass-Yet-Another-Favicon-Downloader

Yet Another Favicon Downloader for KeePass 2.x
MIT License
535 stars 31 forks source link

Sites with favicons that the plugin doesn't catch #29

Closed JohnLGalt closed 5 years ago

JohnLGalt commented 5 years ago

List of sites that are not working currently, but when viewed in a browser (Firefox Nightly current), definitely have a favicon in the tab:

https://www.linuxquestions.org/

http://www.tigerdirect.com/

https://www.classmates.com/

https://www.tirerack.com/

https://www.ghostrecon.net/

I'm not complaining, that's a whole 3 out of several hundred. I'm providing sites in hopes that you can figure out why it is not working and possibly tweak your code to get these sites (and others like them) working :)

JohnLGalt commented 5 years ago

With 2 of the sites, LinuxQuestions and ClassMates, I was able to view the page source, and there was a direct reference to the favicon.ico file in the source, which, when I clicked on, displayed the icon directly so I could download and add to the database.

So, my guess is that the code needs very little tweaking to get those working.

With TigerDirect, the file is a .PNG, which might make a difference, and it is referenced through some slightly intricate code, but I was still able to get it displayed in a browser tab to download.

With TireRack, and GhostRecon, it was simply a matter of appending favicon.ico to the end the the URL, although the GR icon would not import into the database until I edited it with Micro$oft Paint 3D and resaved as .PNG (Paint.NET and regular M$ Paint could not edit the file).

navossoc commented 5 years ago

Same issue here. I'll look into later.

I have some pending modifications that I want to make.

Thanks for the detailed input.

navossoc commented 5 years ago

I did a few changes, 3 of 5 works now.

ghostrecon.net has some weird icon format and can't be parsed by KeePass/.NET Framework. tirerack.com gives me "timeout" when using the YAFD.

I'm planning to create a fallback to cases like this, it may help. I just do not know when I'll do it.

JohnLGalt commented 5 years ago

Yeah, that one from ghostrecon I could only edit in Microsoft Paint 3D (Windows 10). I figured that was going to be beyond the scope of the plugin - especially as it is literally the only favicon I found like that.

With tirerack, I just did this: https://www.tirerack.com/favicon.ico and it pops right up. Strangely enough, though, in a quick glance (and search) through the source code of the main page at TireRack, I found no references to favicon at all - so appending favicon.ico to the end of the base URL was my last ditch effort to get the icon.

As for the fallback - no worries. I think that it might be more than you really want in the plugin - it already does what it says it will do and then some. The fallback already (technically) exists, as KeePass assigns the icon based either on your group settings or the generic default key icon.

Thanks for taking a look and responding so quickly, btw - sorry I was unable to get back here quickly enough to reply. You've done a great job with this, and your reaction time is superlative!

navossoc commented 5 years ago

I got some spare time, I decided to use it... 🍰

I did release a preview for the next version, have you checked it out? https://github.com/navossoc/KeePass-Yet-Another-Favicon-Downloader/releases/tag/v1.2.1.0-pre

If no issues were found, I will publish it as the final one.

PS: Oops, I realized now that I had forgotten to attach the binary file.

JohnLGalt commented 5 years ago

Yup - working fine on the 3 that failed before. Thanks!

JohnLGalt commented 5 years ago

Found another site that even he latest 1.2.1pre fails on, but the icon is easily downloaded by appending favicon.ico: https://www.howardforums.com/favicon.ico (found URL from source page).

Although, when saving the image, it defaults to being named index.ico, which may be a key factor.

me-and commented 5 years ago

I just took a look at the ghostrecon.net icon out of curiosity. At least according to my copy of file, they've uploaded an MS Windows cursor as the icon. That evidently mostly works in browsers (the cursor file format is almost identical to the .ico file format) but KeePass appears to not be set up to handle such files.

I think insofar as that's a KeePass problem at all, it's in the underlying KeePass code rather than anything to do with the YAFD plugin. And really, the site owners should upload an icon to use as an icon, rather than a cursor file.

JohnLGalt commented 5 years ago

That's just weird. Never would have guessed it was a cursor, since appending favicon.ico to the URL just downloads the file.

I did find it a bit odd that regular M$ Paint would not open the file, though....

JohnLGalt commented 5 years ago

@navossoc - I've not had any other issues, so I'm closing this as you fixed the majority of the ones that would not DL but were there.

We'll just leave Ghost Recon alone :p