pluralsight-scraper icon indicating copy to clipboard operation
pluralsight-scraper copied to clipboard

Feature request: resume after error/interruption

Open gillespieza opened this issue 4 years ago • 7 comments

Currently, if the script breaks, I have to restart downloading from the beginning of a course. I would love to be able to resume from where it broke.

Perhaps it could skip existing files, even if I have to manually confirm Y/N for overwriting existing files?

gillespieza avatar Apr 16 '20 10:04 gillespieza

Currently, if the script breaks, I have to restart downloading from the beginning of a course. I would love to be able to resume from where it broke.

Perhaps it could skip existing files, even if I have to manually confirm Y/N for overwriting existing files?

Yeah, i have the same problem, i really do need this bot, i hope the developer could update it so often.

Aryangh1379 avatar Apr 16 '20 16:04 Aryangh1379

I'm a pretty busy guy. Right now I did the bare minimum to get it working again. I'm hoping on other people contributing to the code-base.

All that needs to happen to make this work is a .slice(numberOfFilesPresent-1) on the list of videos to download and and adjust the indexes of the file to be index + numberOfFilesPresent) or some variant of that.

vezaynk avatar Apr 16 '20 16:04 vezaynk

I'm a pretty busy guy. Right now I did the bare minimum to get it working again. I'm hoping on other people contributing to the code-base.

All that needs to happen to make this work is a .slice(numberOfFilesPresent-1) on the list of videos to download and and adjust the indexes of the file to be index + numberOfFilesPresent) or some variant of that.

how exactly should I do it ? I'm not a programmer

Aryangh1379 avatar Apr 16 '20 17:04 Aryangh1379

@aryangh I'm actually curious, what are you doing with pluralsight if not for programming?

vezaynk avatar Apr 16 '20 17:04 vezaynk

@knyzorg, Pluralsight is not merely for leaning programming AFAIK, I'm trying to download Linux learning videos with pluralsight.

Aryangh1379 avatar Apr 17 '20 08:04 Aryangh1379

#umactually this shouldn't be needed, because your code already checks the local filesystem for if the video already exists? if (!fs.existsSync(file)) { console.log('Downloading video file for: ${video.title + ".mp4"}'); const data = await fetch(video.url); const fileStream = fs.createWriteStream(file); data.body.pipe(fileStream); }

However, with every PL course I've tried, I get a few videos (between 7 and 15), then the script breaks, and if I restart it, it starts again from video 1, and breaks at the same spot.

gillespieza avatar Apr 17 '20 16:04 gillespieza

any one cares to write an sample code to start downloading from video index 13 , so it skips checking for the previous videos ?

coeur85 avatar May 14 '20 06:05 coeur85