Code Monkey home page Code Monkey logo

educative.io-downloader's Introduction

Hi, I am Shihab πŸ‘‹

Tech used:

  • TypeScript, JavaScript, Python, C#, Java, C++, Bash, PHP
  • Node.js, .NET Core, Laravel
  • MySQL, MS SQL, MongoDB
  • Docker, Redis, Elasticsearch, RabbitMQ

Cloud experience:

  • AWS
  • Azure
  • GCP

Connect:

educative.io-downloader's People

Contributors

devdcores avatar devkshitijjain avatar shihabmridha avatar thisisamank avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

educative.io-downloader's Issues

Can't open or view the mhtml saved files after downloading it

Hi,
I Can't open or view the mhtml saved files after downloading it.

I get a blank page with this message " We use cookies as well as similar tools and technologies to improve your experience and to understand how our site is being used. Review our PRIVACY POLICY to learn more about what cookies we use and how to amend your cookie settings."

Screenshot 2020-07-26 at 03 42 56

Downloaded paged shown as blank page in browser

Pages has been downloaded successfully using this nice utility.
mhtml pages are not blank, seems to have all contents.
But while opening using browser, pages are blank. Tried with chrome, edge, safari, but same behaviour. Exporting to pdf also result in blank pdf.
Would you please let us know how to view the saved pages?

Not able to install dependencies. Error while installing dependency "puppeteer"

I am getting below error when I execute "npm install" command to install dependencies,

npm install

[email protected] install C:\amit_fegade\softwares\educative-io\educative.io-downloader-master\node_modules\puppeteer
node install.js

ERROR: Failed to download Chromium r706915! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.
Error: self signed certificate in certificate chain
at TLSSocket.onConnectSecure (_tls_wrap.js:1473:34)
at TLSSocket.emit (events.js:311:20)
at TLSSocket._finishInit (_tls_wrap.js:916:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:686:12)
-- ASYNC --
at BrowserFetcher. (C:\amit_fegade\softwares\educative-io\educative.io-downloader-master\node_modules\puppeteer\lib\helper.js:111:15)
at Object. (C:\amit_fegade\softwares\educative-io\educative.io-downloader-master\node_modules\puppeteer\install.js:62:16)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47 {
code: 'SELF_SIGNED_CERT_IN_CHAIN'
}
npm WARN rollback Rolling back [email protected] failed (this is probably harmless): EPERM: operation not permitted, lstat 'C:\amit_fegade\softwares\educative-io\educative.io-downloader-master\node_modules\https-proxy-agent\node_modules'
npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install 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\amitf\AppData\Roaming\npm-cache_logs\2020-05-23T17_24_29_780Z-debug.log.

Support Downloading Course with all the Languages Available

Idea is to have firstPageWithCode where user can define where the code is and then navigate to that page. Look for code block determine languages available. Store those in array. For Loop on that array and first. navigate to above page, click on the first language tab by name of language as there is inconsistency in tab index and then continue with downloading pages, and so on. Also need to match code url with course url in case user forget to change it. Although this will only work if single course is present in config file. Do you have any idea?

Print to pdf not implemented

I am getting an error that says "Reason: Protocol error (Page.printToPDF): PrintToPDF is not implemented" Which results in nothing being downloaded. Btw I have loginCheck and headless set as false.

Need help to do it!!

I downloaded type script but after that what i have to do, i am not getting that much from the usage section. Please help.

No matter what I try I get the same error.

internal/modules/cjs/loader.js:968
throw err;
^

Error: Cannot find module 'C:\Users\dEnOmInAtOr\Downloads\educative.io-downloader-master\build\src\app.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
at Function.Module._load (internal/modules/cjs/loader.js:841:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node build/src/app.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start 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\dEnOmInAtOr\AppData\Roaming\npm-cache_logs\2020-07-28T01_43_35_456Z-debug.log

Not able to run npm run install

C:\Users\Aashish\Desktop\educative.io\educative.io-downloader>npm run install
npm ERR! missing script: install

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Aashish\AppData\Roaming\npm-cache_logs\2020-05-07T04_24_18_631Z-debug.log

Below is my Scripts tag in package.json
"scripts": {
"start": "node build/src/app.js",
"dev": "nodemon build/src/app.js",
"compile": "tsc -p .",
"test": "echo "Error: no test specified" && exit 1",
},

Can you please guide me step by step. I am a newbie...!

Downloaded PDF Size is 1KB....Not able to download pdf

Hi,
I downloaded pdf, because mhtml files are not opening in chrome or firefox. I set true also in browser.ts file to check login. I am successfully logged-in in the browser. Pdf files are not downloaded properly and their size is coming 1KB.
mhtml are not good to read, without CSS they are not looking good. Could you please change it like earlier version where file are downloaded in html format. Please check that pdf file issue also.
issue

downloadAllCourses not working anymore?

downloadAllCourses:true used to work, but I think it stopped working. It only downloads What would be the best way to troubleshoot?

Found 9 courses to download on this page.
Found 30 courses to download on this page.
Found 30 courses to download on this page.
.
.
.
Found a total of 15 courses to download.

Text got cut when downloading to pdf format

image

Here's my configuration
{ "email": "", "password": "", "loginCheck": true, "saveAs": "pdf", "multiLanguage": true, "courseUrl": "https://www.educative.io/courses/grokking-the-coding-interview", "downloadAllCourses": false }

Feature: Ability to download specific lesson

Sometimes the script fails to download a few lessons get of a course. One of the major reason is HTTP TIMEOUT. So, it makes sense to download only those missing lessons instead of the whole course again.

Initial approach:
Before downloading a lesson look in the respective download directory to check if the file is already downloaded. If yes, then skip the lesson.

Image Functionality Broken

The changes I added broke the image functionality. Throwing error Protocol error (Page.captureScreenshot): Cannot take screenshot with 0 width. So we need to rethink the approach or I will suggest to stick to just HTML as code will be trimmed in both image and pdf.

Seems like educative.io captcha is not working

❯ npm run compile

[email protected] compile /Users/arjun/lab/educative/educative.io-downloader
tsc -p .

error TS6047: Argument for '--target' option must be 'ES3', 'ES5', or 'ES6'.
error TS5023: Unknown compiler option 'lib'.
error TS5023: Unknown compiler option 'moduleResolution'.
error TS5023: Unknown compiler option 'noUnusedLocals'.
error TS5023: Unknown compiler option 'noUnusedParameters'.
error TS5023: Unknown compiler option 'forceConsistentCasingInFileNames'.
error TS5023: Unknown compiler option 'skipLibCheck'.
error TS5023: Unknown compiler option 'pretty'.
error TS5023: Unknown compiler option 'allowUnreachableCode'.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] compile: tsc -p .
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] compile 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! /Users/arjun/.npm/_logs/2020-05-01T21_30_28_161Z-debug.log

Errors

(node:72254) UnhandledPromiseRejectionWarning: Error: Page crashed!
at Page._onTargetCrashed (/home/user/work/other/educative.io-downloader/node_modules/puppeteer/lib/Page.js:216:24)
at CDPSession. (/home/user/work/other/educative.io-downloader/node_modules/puppeteer/lib/Page.js:124:56)
at CDPSession.emit (events.js:315:20)
at CDPSession._onMessage (/home/user/work/other/educative.io-downloader/node_modules/puppeteer/lib/Connection.js:200:12)
at Connection._onMessage (/home/user/work/other/educative.io-downloader/node_modules/puppeteer/lib/Connection.js:112:17)
at WebSocket. (/home/user/work/other/educative.io-downloader/node_modules/puppeteer/lib/WebSocketTransport.js:44:24)
at WebSocket.onMessage (/home/user/work/other/educative.io-downloader/node_modules/ws/lib/event-target.js:120:16)
at WebSocket.emit (events.js:315:20)
at Receiver.receiverOnMessage (/home/user/work/other/educative.io-downloader/node_modules/ws/lib/websocket.js:789:20)
at Receiver.emit (events.js:315:20)
(node:72254) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 7)

Why can I get this error?

new to typescript

Sir,could you be more detailed?i am new to typescript as well as git

Paid subscription required to download?

You need a subscription to use this

Does it mean I need to have a paid subscription to leverage this? I have headless mode set to true and still I get blank pdf pages.

I tried to debug by settings the headless mode set to false, then I see an error printToPDF not implemented.

How are you guys viewing the files?

Every MHTML document is opening up the index file which when you click on opens the website. Also, the pdf option downloads empty 1Kb pdf files. Am I missing something?

Also, if headless is set to false, it does not login. It seems to log in only when headless is set to true.

Not getting logged in

{ "errorText": "Access denied. Please contact [email protected]", "request_id": "5e6e09ac00ff0600ffa5a4c6439e0001737e6564756361746976652d6865736976650001763230303330322d686f746669782d3230303330392d3132313600010101" }

Also it shouldn't proceed downloading course if login failed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.