Open joelstitch opened 9 months ago
Hello, can you send me the error message you get?
I actually got it confused with a similar github project but for this project I always get this error when I run the script even though I have Chronium installed.
/home/rw/domestika-downloader/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:289
throw new Error(`Could not find Chromium (rev. ${this.puppeteer.browserRevision}). This can occur if either\n` +
^
Error: Could not find Chromium (rev. 1108766). This can occur if either
1. you did not perform an installation before running the script (e.g. `npm install`) or
2. your cache path is incorrectly configured (which is: /home/rw/.cache/puppeteer).
For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.
at ChromeLauncher.resolveExecutablePath (/home/rw/domestika-downloader/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:289:27)
at ChromeLauncher.executablePath (/home/rw/domestika-downloader/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:182:25)
at ChromeLauncher.computeLaunchArguments (/home/rw/domestika-downloader/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:99:37)
at async ChromeLauncher.launch (/home/rw/domestika-downloader/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:83:28)
at async scrapeSite (/home/rw/domestika-downloader/index.js:36:21)
Node.js v20.10.0
I am also not able to download domestika plus courses
Try running this command:
node node_modules/puppeteer/install.js
in the root folder, so the same folder you ran the above command. That should install the needed chromium files. Sometimes puppeteer seems to not do that as its supposed to do.
I ran the command you gave me and it installed with no error but when I run **npm run start** I get this:
rw@rw:~/domestika-downloader$ npm run start
> domestika-downloader@1.0.0 start
> node index.js
Puppeteer old Headless deprecation warning:
In the near feature `headless: true` will default to the new Headless mode
for Chrome instead of the old Headless implementation. For more
information, please see https://developer.chrome.com/articles/new-headless/.
Consider opting in early by passing `headless: "new"` to `puppeteer.launch()`
If you encounter any bugs, please report them to https://github.com/puppeteer/puppeteer/issues/new/choose.
Puppeteer old Headless deprecation warning:
In the near feature `headless: true` will default to the new Headless mode
for Chrome instead of the old Headless implementation. For more
information, please see https://developer.chrome.com/articles/new-headless/.
Consider opting in early by passing `headless: "new"` to `puppeteer.launch()`
If you encounter any bugs, please report them to https://github.com/puppeteer/puppeteer/issues/new/choose.
/home/rw/domestika-downloader/index.js:131
for (let i = 0; i < data.videos.length; i++) {
^
TypeError: Cannot read properties of undefined (reading 'length')
at getInitialProps (/home/rw/domestika-downloader/index.js:131:41)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async scrapeSite (/home/rw/domestika-downloader/index.js:56:25)
Hi, I get this error. Can you tell me what did I do wrong ?
Hi, I get this error. Can you tell me what did I do wrong ?
The 'credentials' cookie is not correct. If you can't find them on Chrome, try on Mozilla.
The Cookie Editor plugin displays more info on the Firefox version than on the Chrome version. Use Cookie Editor by cgagnier on Firefox for this.
Hi, I get this error. Can you tell me what did I do wrong ?
I am also getting this error if use cookies from Firefox using the extension 'Cookie Editor by cgagnier' as suggested by @MundoMedia
If I use cookies from Chrome, I get the error, 'Error Fetching Data, check the credentials are still valid.'.
This is specifically happening with courses that I have under 'plus' subscription. The courses that I have bought individually are getting downloaded fine using the chrome cookies. What should I do?
Edit. I found out the solution.
Contrarty to what the error shows, this problem has to do with the how the url is structured for plus courses vs. the individually bought courses.
There must be always "/course" at the end otherwise there will be an error and the course won't get downloaded.
Courses being accessed with plus subscription don't have /course at their end and one must add it separately in order to successfully download the course.
So this link
https://www.domestika.org/en/courses/1419-3d-animation-with-cinema-4d-and-redshift-for-beginners
Should be this instead.
That's it.
Well done. I was manually adding also, like you are, until I realized that if you go to the main course page for a Plus course, then click the 'Content' tab, it takes you to the /course page for that course. Also note, the cookies and credentials will expire all during the day so you may find you have to regularly update them, and be careful not to accidentally replace more than the cookie or credential key in the script because that will also throw up a confusing error -- like it did with me when I did that. Although ChatGPT is your friend in these cases, I used it to add various functions to this script. Thanks again to the dev for an excellent solution.
@MundoMedia or any one please help I am not into js or node and I am not understanding where I am going wrong.
domestika-downloader@1.0.0 start node index.js
Scraping Site 0 Units Detected All Videos Found Fetching Final Project Error Fetching Data, check the credentials are still valid. All Videos Downloaded arunadurgadevirudrakshala@Arunas-Mac-mini domestika-downloader-main %
I have Domestika PLUS and would like to download some of the free courses but when I try one of the courses I get with PLUS I just get a Error message for all the video files.