ikeboy / pluralsight-scraper

Pluralsight video downloader
https://www.knyz.org/blog/post/pluralsight-scraper-released/
GNU General Public License v2.0
139 stars 50 forks source link

Tab symbol error handling #35

Closed prostopasta closed 3 years ago

prostopasta commented 4 years ago

Experienced 'Tab' symbol in title name, got the following error: """ Retrieving metadata for:

  1. What We're Going to Learn

Downloading video file for:

  1. What We're Going to Learn.mp4

events.js:292 throw er; // Unhandled 'error' event ^

Error: ENOENT: no such file or directory, open

F:!Programming!\pluralsight-scraper\videos\incident-response-handling-performing\73.
What We're Going to Learn.mp4

Emitted 'error' event on WriteStream instance at: at errorOrDestroy (internal/streams/destroy.js:108:12) at WriteStream.onerror (_stream_readable.js:753:7) at WriteStream.emit (events.js:315:20) at internal/fs/streams.js:376:12 at FSReqCallback.oncomplete (fs.js:155:23) { errno: -4058, code: 'ENOENT', syscall: 'open', path: "F:\\!Programming!\\pluralsight-scraper\\videos\\incident-response-handling-performing\\73. \tWhat We're Going to Learn.mp4" """ What symbol should I add to exclusion - would work adding [\t] or need some other tabular symbol coding?

vezaynk commented 4 years ago

would work adding [\t] or need some other tabular symbol coding?

I think? I didn't even know this could be an issue. Can other white space characters break things too? shudders

Lets be on the safe side and do something like this: https://stackoverflow.com/a/1981366/4088472

prostopasta commented 4 years ago

ok, got ya

jubayerarefin commented 4 years ago

I had the same issue. So, I just trimmed the title and it is working nicely. Created a PR for this.