metascraper-logo-favicon 5.32.1 → 5.32.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +8 -2
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -110,8 +110,14 @@ const createGetLogo = ({ gotOpts, keyvOpts }) => {
|
|
|
110
110
|
const faviconUrl = logo('/favicon.ico', { url })
|
|
111
111
|
if (!faviconUrl) return
|
|
112
112
|
|
|
113
|
-
let response = await reachableUrl(faviconUrl,
|
|
114
|
-
|
|
113
|
+
let response = await reachableUrl(faviconUrl, {
|
|
114
|
+
...gotOpts,
|
|
115
|
+
followRedirect: false
|
|
116
|
+
})
|
|
117
|
+
|
|
118
|
+
if (response.statusCode >= 200 && response.statusCode < 300) {
|
|
119
|
+
return faviconUrl
|
|
120
|
+
}
|
|
115
121
|
|
|
116
122
|
response = await reachableUrl(
|
|
117
123
|
`https://www.google.com/s2/favicons?domain_url=${url}&sz=128`,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "metascraper-logo-favicon",
|
|
3
3
|
"description": "metascraper logo favicon fallback",
|
|
4
4
|
"homepage": "https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-logo-favicon",
|
|
5
|
-
"version": "5.32.
|
|
5
|
+
"version": "5.32.2",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"author": {
|
|
8
8
|
"email": "hello@microlink.io",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"test": "NODE_PATH=.. TZ=UTC ava --timeout 15s"
|
|
42
42
|
},
|
|
43
43
|
"license": "MIT",
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "0dfa9acc1cdcae0434456f11bfa7c229fc48d52c"
|
|
45
45
|
}
|