mirror of
https://github.com/webrecorder/browsertrix-crawler.git
synced 2025-10-19 14:33:17 +00:00
favicon: use 127.0.0.1 instead of localhost (#384)
catch exception in fetch bump to 0.11.1
This commit is contained in:
parent
debfe8945f
commit
0c88eb78af
2 changed files with 12 additions and 8 deletions
|
@ -446,7 +446,8 @@ self.__bx_behaviors.selectMainBehavior();
|
|||
}
|
||||
|
||||
async getFavicon(page, logDetails) {
|
||||
const resp = await fetch("http://localhost:9221/json");
|
||||
try {
|
||||
const resp = await fetch("http://127.0.0.1:9221/json");
|
||||
if (resp.status === 200) {
|
||||
const browserJson = await resp.json();
|
||||
for (const jsons of browserJson) {
|
||||
|
@ -455,7 +456,10 @@ self.__bx_behaviors.selectMainBehavior();
|
|||
}
|
||||
}
|
||||
}
|
||||
logger.warn("Failed to fetch Favicon from localhost debugger", logDetails);
|
||||
} catch (e) {
|
||||
// ignore
|
||||
}
|
||||
logger.warn("Failed to fetch favicon from browser /json endpoint", logDetails);
|
||||
}
|
||||
|
||||
async crawlPage(opts) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "browsertrix-crawler",
|
||||
"version": "0.11.0",
|
||||
"version": "0.11.1",
|
||||
"main": "browsertrix-crawler",
|
||||
"type": "module",
|
||||
"repository": "https://github.com/webrecorder/browsertrix-crawler",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue