Browse Source

fix favicons

main
matthew 2 years ago
parent
commit
228a216402
  1. 14
      searching-front/services/main.ts
  2. 4
      searching-front/services/modules/parser/index.ts

14
searching-front/services/main.ts

@ -6,13 +6,13 @@ import parser from "./parser"
import influx from "./influx"
const run = async()=>{
console.log('Start domain watcher')
console.time('watcher')
await domainWatcher();
console.timeEnd('watcher')
influx()
console.log('Start parser');
console.time('watcher');
// console.log('Start domain watcher')
// console.time('watcher')
// await domainWatcher();
// console.timeEnd('watcher')
// influx()
// console.log('Start parser');
// console.time('watcher');
await parser();
console.timeEnd('watcher');

4
searching-front/services/modules/parser/index.ts

@ -32,8 +32,8 @@ const getFaviconUrl = (dom:JSDOM, domain:string) => {
try {
url = new URL(href);
} catch(e){
url = new URL(domain+href);
url.pathname = url.pathname.replace('//','/');
url = new URL(domain+'/'+href);
url.pathname = url.pathname.replaceAll('//','/');
}
return url.toString();
}

Loading…
Cancel
Save