f
This commit is contained in:
parent
b7efdb1808
commit
76c349de4d
1 changed files with 1 additions and 3 deletions
4
site.js
4
site.js
|
@ -29,9 +29,7 @@ async function urlCollector(url, path, file, useLimit) {
|
||||||
let h = body(link).attr('href');
|
let h = body(link).attr('href');
|
||||||
if (!h) return;
|
if (!h) return;
|
||||||
h = h.trim();
|
h = h.trim();
|
||||||
if (h.startsWith('./') && h.startsWith('../')) {
|
if (h.startsWith('./') || h.startsWith('../') || h.startsWith('/')) {
|
||||||
h = `${url}/h`;
|
|
||||||
} else if (h.startsWith('/')) {
|
|
||||||
let u = new URL(url);
|
let u = new URL(url);
|
||||||
u.pathname = h;
|
u.pathname = h;
|
||||||
h = u.toString();
|
h = u.toString();
|
||||||
|
|
Loading…
Reference in a new issue