kaotkbliss Posted April 10, 2013 Posted April 10, 2013 trying to use this udfbut the _HTML_Get() function is almost always returning an empty string. Especially if the link is in a sub domain(?)I'm horrible at regexp so I'm not sure how it's searching to fix the problem. Or maybe there is a better way to get the full path to a favicon?#include <_html.au3> Local $url[3] $url[0] = "[url="http://www.autoitscript.com/autoit3/index.shtml"]http://www.autoitscript.com/autoit3/index.shtml[/url]" $url[1] = "[url="http://www.imdb.com/"]http://www.imdb.com/[/url]" $url[2] = "[url="http://www.homedepot.com/Doors-Windows-Doors-Entry-Doors-Screen-Doors/h_d1/N-5yc1vZbaed/h_d2/Navigation?catalogId=10053&Nu=P_PARENT_ID&langId=-1&storeId=10051¤tPLP=true&omni=c_Screen"]http://www.homedepot.com/Doors-Windows-Doors-Entry-Doors-Screen-Doors/h_d1/N-5yc1vZbaed/h_d2/Navigation?catalogId=10053&Nu=P_PARENT_ID&langId=-1&storeId=10051¤tPLP=true&omni=c_Screen[/url] Doors&searchNav=true" For $i = 0 to UBound($url)-1 $sHTML = _HTML_GetSource($url[$i]) $sIconURL = _HTML_Get($sHTML, "link", "href", "image/x-icon", "type") MsgBox(0,$url[$i],$sIconURL) Next_HTML.au3 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy!
kaotkbliss Posted April 11, 2013 Author Posted April 11, 2013 hmm, nothing so far? Well, I tried to start with just the .com part, then add sub domains durring a loop if the icon was not found, but it's still not finding #include <_html.au3> Local $url[3] $url[0] = "http://www.autoitscript.com/autoit3/index.shtml" $url[1] = "http://www.imdb.com/" $url[2] = "http://www.homedepot.com/Doors-Windows-Doors-Entry-Doors-Screen-Doors/h_d1/N-5yc1vZbaed/h_d2/Navigation?catalogId=10053&Nu=P_PARENT_ID&langId=-1&storeId=10051¤tPLP=true&omni=c_Screen Doors&searchNav=true" $sIconURL = "" For $i = 0 to UBound($url)-1 $split = StringSplit($url[$i],"/") $combine = $split[1]&"/" For $z = 3 To UBound($split) - 1 $combine = $combine&"/"&$split[$z] $sHTML = _HTML_GetSource($combine) $sIconURL = _HTML_Get($sHTML, "link", "href", "image/x-icon", "type") If $sIconURL <> "" Then MsgBox(0,$combine,$sIconURL) ExitLoop EndIf Next If $sIconURL = "" Then MsgBox(0,$url[$i],"No favicon found") EndIf Next 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy!
wakillon Posted April 26, 2013 Posted April 26, 2013 (edited) Using getfavicon.appspot.com website you can download your Favicons like this : Global $url[3] $url[0] = "http://www.autoitscript.com/autoit3/index.shtml" $url[1] = "http://www.imdb.com/" $url[2] = "http://www.homedepot.com/Doors-Windows-Doors-Entry-Doors-Screen-Doors/h_d1/N-5yc1vZbaed/h_d2/Navigation?catalogId=10053&Nu=P_PARENT_ID&langId=-1&storeId=10051¤tPLP=true&omni=c_Screen Doors&searchNav=true" For $i = 0 to UBound ( $url ) -1 INetGet ( 'https://getfavicon.appspot.com/' & $url[$i], @DesktopDir & '\' & $i & '.ico', 1+2+8 ) Next But attention, it can be a gif or png filetype too ! Edited April 27, 2013 by wakillon AutoIt 3.3.18.0 X86 - SciTE 4.4.6.0 - WIN 11 24H2 X64 - Other Examples Scripts
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now