Closed ghost closed 21 hours ago
Probably line 161 being if(req.url().includes("main.c41543fd.js")) {
. It should realistically be something like if(req.url().regexIncludes("main.[0-9a-z]{8}.js")) {
.
C:\Users\RootX\node_modules\sans-video-ripper\index.js:161 if(req.url().regexIncludes("main.[0-9a-z]{8}.js")) { ^
TypeError: req.url(...).regexIncludes is not a function at C:\Users\RootX\node_modules\sans-video-ripper\index.js:161:16 at C:\Users\RootX\node_modules\puppeteer-core\lib\cjs\puppeteer\api\Page.js:238:32 at async CdpHTTPRequest.finalizeInterceptions (C:\Users\RootX\node_modules\puppeteer-core\lib\cjs\puppeteer\cdp\HTTPRequest.js:86:9)
Node.js v22.2.0
Yeah I'm tracking it's not a real function. It needs to change to something like that, so a custom function needs to be made.
@TheBrenny you found the root cause, thank you very much!
Add : const regexPattern = /main.[0-9a-z]{8}.js/;
Replace: if(req.url().includes("main.c41543fd.js")) {
with if (regexPattern.test(req.url())) {
I'm doing a bit of a review, and it's not as easy as that... The reason the version hash was updated by SANS isn't a mistake (either it's a per course thing or they've made changes), so there's a little bit of hackery that needs to happen...
Script is at "Getting course name..." sitting in the course on the browser, and has created the course folder within the path provided for output.