mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-17 22:00:00 +00:00
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