I'm trying to use web-archive-site-mirror at the page https://lcc-archive.aws.walkerart.org/collections/publications/jazz/creative-black-music-at-the-walker-selections-from-the-archives/. I'm getting a type error in the URL constructor called in initAnchorElemOverride: TypeError: URL constructor: /collections/publications/jazz/creative-black-music-foreword is not a valid URL.
The compiled but unminified code reads as follows
initAnchorElemOverride() {
const t = Object.getOwnPropertyDescriptor(HTMLAnchorElement.prototype, 'href');
if (!t?.get) return;
const e = this,
r = t.get,
i = t => {
const i = Object.getOwnPropertyDescriptor(HTMLAnchorElement.prototype, t);
if (!i?.set) return;
const o = i.set;
Object.defineProperty(
HTMLAnchorElement.prototype,
t,
{
set(r) {
const i = new URL(e.rewriteUrl(r));
return o.call(this, i[t])
},
get() {
return new URL(e.unrewriteUrl(r.call(this))) [t]
}
}
)
};
i('href'),
i('hostname'),
i('host'),
i('protocol'),
i('origin')
}
The error is happening an the line const i = new URL(e.rewriteUrl(r)); If I work my way backwards, I think this corresponds to
|
const url = new URL(rw.rewriteUrl(v)); |
.
I don't understand the code well enough to know what rewriteUrl (or convUrl inside it) SHOULD be returning and why they're returning the wrong thing though 😄
I'm trying to use web-archive-site-mirror at the page https://lcc-archive.aws.walkerart.org/collections/publications/jazz/creative-black-music-at-the-walker-selections-from-the-archives/. I'm getting a type error in the URL constructor called in initAnchorElemOverride:
TypeError: URL constructor: /collections/publications/jazz/creative-black-music-foreword is not a valid URL.The compiled but unminified code reads as follows
The error is happening an the line
const i = new URL(e.rewriteUrl(r));If I work my way backwards, I think this corresponds towabac.js/src/rewrite/proxyinject.ts
Line 432 in 94a1411
I don't understand the code well enough to know what rewriteUrl (or convUrl inside it) SHOULD be returning and why they're returning the wrong thing though 😄