Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm ERR! code ELIFECYCLE #16

Open
Aryangh1379 opened this issue Apr 10, 2020 · 4 comments
Open

npm ERR! code ELIFECYCLE #16

Aryangh1379 opened this issue Apr 10, 2020 · 4 comments

Comments

@Aryangh1379
Copy link

Hi Dear, i coudn't download linux-system-security-lpic-2 it gave me some kind of error that i intserted bellow . First i tried to download you example course, it was fine.

aryan@Ubuntu:~/pluralsight-scraper$ npm run get -- "https://app.pluralsight.com/library/courses/rust-fundamentals/table-of-contents"
 
> pluralsight-scraper@2.1.0 get /home/aryan/pluralsight-scraper
> node index.js get "https://app.pluralsight.com/library/courses/rust-fundamentals/table-of-contents"

Downloading course: rust-fundamentals
Retrieving metadata for: 1. Course Overview
Downloading video file for: 1. Course Overview.mp4
Retrieving metadata for: 2. Module Overview
Downloading video file for: 2. Module Overview.mp4
Retrieving metadata for: 3. Installing Rust
Downloading video file for: 3. Installing Rust.mp4
^Caryan@Ubuntu:~/pluralsight-scraper$ npm run get -- "https://app.pluralsight.com/library/courses/linux-system-security-lpic-2/table-of-contents"

> pluralsight-scraper@2.1.0 get /home/aryan/pluralsight-scraper
> node index.js get "https://app.pluralsight.com/library/courses/linux-system-security-lpic-2/table-of-contents"

Downloading course: linux-system-security-lpic-
Something went wrong. Double check the URL and try logging in again.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pluralsight-scraper@2.1.0 get: `node index.js get "https://app.pluralsight.com/library/courses/linux-system-security-lpic-2/table-of-contents"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the pluralsight-scraper@2.1.0 get script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/aryan/.npm/_logs/2020-04-10T09_33_13_237Z-debug.log
aryan@Ubuntu:~/pluralsight-scraper$ 

Thanks in advance!

@vezaynk
Copy link
Collaborator

vezaynk commented Apr 10, 2020

Whoopsy. The regex only matches - and [a-z], my bad! I totally forgot about numbers. Fix coming soon.

If you want to do it yourself and PR it, update this line: https://github.com/knyzorg/pluralsight-scraper/blob/8388d58bfdb760d55f50e60ed852fbe063546ea4/index.js#L10

To include the [0-9] pattern as well.

@cicerothoma
Copy link

Hi Dear, I also had trouble using the script on my windows machine. When I run your own example, it works but when I change the URL it no longer works
`C:\Users\COLLINS\projects\pluralsight\pluralsight-scraper>npm run get -- "https://app.pluralsight.com/library/courses/rust-fundamentals/table-of-contents"

pluralsight-scraper@2.1.0 get C:\Users\COLLINS\projects\pluralsight\pluralsight-scraper
node index.js get "https://app.pluralsight.com/library/courses/rust-fundamentals/table-of-contents"

Downloading course: rust-fundamentals
Retrieving metadata for: 1. Course Overview
Downloading video file for: 1. Course Overview.mp4
Terminate batch job (Y/N)? y

C:\Users\COLLINS\projects\pluralsight\pluralsight-scraper>npm run get -- "https://app.pluralsight.com/library/courses/math-for-programmers/table-of-contents"

pluralsight-scraper@2.1.0 get C:\Users\COLLINS\projects\pluralsight\pluralsight-scraper
node index.js get "https://app.pluralsight.com/library/courses/math-for-programmers/table-of-contents"

Downloading course: math-for-programmers
Retrieving metadata for: 1. Welcome
Something went wrong. Double check the URL and try logging in again.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pluralsight-scraper@2.1.0 get: node index.js get "https://app.pluralsight.com/library/courses/math-for-programmers/table-of-contents"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pluralsight-scraper@2.1.0 get script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\COLLINS\AppData\Roaming\npm-cache_logs\2020-04-11T20_09_06_202Z-debug.log`

@vezaynk
Copy link
Collaborator

vezaynk commented Apr 12, 2020

@cicerothoma Your problem is likely different. I will investigate another time, but it looks like a suspension.

Improved error handling to be tracked in #17

@Aryangh1379
Copy link
Author

Aryangh1379 commented Apr 13, 2020

Whoopsy. The regex only matches - and [a-z], my bad! I totally forgot about numbers. Fix coming soon.

If you want to do it yourself and PR it, update this line:

https://github.com/knyzorg/pluralsight-scraper/blob/8388d58bfdb760d55f50e60ed852fbe063546ea4/index.js#L10

To include the [0-9] pattern as well.

return /library\/courses\/([a-z\-0-9]+)/gi.exec(url)[1];
Is this True ? i'm not good at programming

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants