fix suggestions by @ihatespawn

This commit is contained in:
hyperdefined 2024-07-24 20:45:57 -04:00
parent 250cbcfac1
commit 49ba560304
No known key found for this signature in database
GPG Key ID: EB0B55B31E88AB03
2 changed files with 13 additions and 13 deletions

View File

@ -4,7 +4,7 @@ import { cleanString } from "../../sub/utils.js";
export default async function(obj) {
// handle video downloads
if (obj.type == 'portal') {
let req = await fetch(`https://www.newgrounds.com/${obj.type}/video/${obj.id}`, {
let req = await fetch(`https://www.newgrounds.com/portal/video/${obj.id}`, {
headers: {
'User-Agent': genericUserAgent,
'X-Requested-With': 'XMLHttpRequest',
@ -83,4 +83,4 @@ export default async function(obj) {
isAudioOnly: true
}
}
}
}

View File

@ -60,5 +60,5 @@ export const testers = {
patternMatch.id?.length <= 11,
"newgrounds": (patternMatch) =>
patternMatch.id?.length <= 6,
patternMatch.id?.length <= 1,
}