fix: allow link elements as well as a
This commit is contained in:
parent
d23b6c2b66
commit
2da6168831
1 changed files with 2 additions and 1 deletions
|
@ -7,7 +7,8 @@ export async function getRelMeLinks(url: string): Promise<string[]> {
|
|||
const dom = new JSDOM(html);
|
||||
const relMeLinks = [
|
||||
...dom.window.document.querySelectorAll("a[rel='me']"),
|
||||
].map((a) => (a as HTMLAnchorElement).href);
|
||||
...dom.window.document.querySelectorAll("link[rel='me']"),
|
||||
].map((a) => (a as HTMLAnchorElement | HTMLLinkElement).href);
|
||||
return relMeLinks;
|
||||
} catch {
|
||||
return [];
|
||||
|
|
Loading…
Reference in a new issue