tumblr: render error template for broken links
This commit is contained in:
parent
81e68c37f5
commit
34d8333d72
1 changed files with 1 additions and 1 deletions
|
@ -4,7 +4,7 @@ import { genericUserAgent } from "../../config.js";
|
|||
export default async function(obj) {
|
||||
const { subdomain } = psl.parse(obj.url.hostname);
|
||||
if (subdomain?.includes('.'))
|
||||
return { error: 'ErrorBrokenLink' }
|
||||
return { error: ['ErrorBrokenLink', 'tumblr'] }
|
||||
|
||||
let html = await fetch(`https://${obj.user ?? subdomain}.tumblr.com/post/${obj.id}`, {
|
||||
headers: { "user-agent": genericUserAgent }
|
||||
|
|
Loading…
Reference in a new issue