processing: pass URL object instead of string

This commit is contained in:
dumbmoron
2023-12-14 23:04:05 +00:00
parent 30c9652b6e
commit 81e68c37f5
4 changed files with 12 additions and 7 deletions

View File

@@ -2,7 +2,7 @@ import psl from "psl";
import { genericUserAgent } from "../../config.js";
export default async function(obj) {
const { subdomain } = psl.parse(obj.url);
const { subdomain } = psl.parse(obj.url.hostname);
if (subdomain?.includes('.'))
return { error: 'ErrorBrokenLink' }