diff --git a/src/modules/processing/services/tumblr.js b/src/modules/processing/services/tumblr.js index 08b3a3e2..6b56ada0 100644 --- a/src/modules/processing/services/tumblr.js +++ b/src/modules/processing/services/tumblr.js @@ -3,10 +3,12 @@ import { genericUserAgent } from "../../config.js"; export default async function(obj) { let { subdomain } = psl.parse(obj.url.hostname); - if (subdomain?.includes('.')) + + if (subdomain?.includes('.')) { return { error: ['ErrorBrokenLink', 'tumblr'] } - else if (subdomain === 'www') - subdomain = undefined; + } else if (subdomain === 'www') { + subdomain = undefined + } let html = await fetch(`https://${subdomain ?? obj.user}.tumblr.com/post/${obj.id}`, { headers: { "user-agent": genericUserAgent } @@ -29,5 +31,5 @@ export default async function(obj) { } } else r = { error: 'ErrorEmptyDownload' }; - return r; + return r }