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

Downloader does not work #85

Open
samarthasthan opened this issue Mar 26, 2024 · 3 comments
Open

Downloader does not work #85

samarthasthan opened this issue Mar 26, 2024 · 3 comments

Comments

@samarthasthan
Copy link

Hey, I am looking for Educative course downloader, i have educative premium account, but i am not able to find any educative downloader also your program is also not working, so can you help me in this? also i you want any course i will download it for you?

@shihabmridha
Copy link
Owner

Hi,
I have migrated the project to run using the Bun runtime. Also fixed an issue with login regarding 2FA.
Please install Bun in your computer. Then clone the project and run bun install to install the dependencies. Then open the config/default.json file and fill the email, password and courseUrl fields. Then run bun start and see if it works.

Side note: While checking authentication, you might get asked to input the OTP code sent via email. As soon as you input the OTP, the script should continue.

@shihabmridha shihabmridha changed the title looking for Educative course downloader Downloader does not work Apr 6, 2024
@iamrahulroy
Copy link

@shihabmridha for me, the downloaded files seems to be damaged. I used the PDF format.

Also, while downloading, CloudFlare threw a human verification captcha. Is there a config to slow down the downloading processes. Maybe stay on single page for 10-15 seconds?

@shihabmridha
Copy link
Owner

shihabmridha commented Apr 13, 2024

@iamrahulroy Thank you for pointing it out.

The downloaded files seems to be damaged. I used the PDF format.

It is an issue with bun. Found a solution for it. Now it should work.

CloudFlare threw a human verification captcha

I do not know how to bypass the captcha verification. What I do is, I run the script in headless = false mode so that I can see the browser and interact with it if necessary. By doing this, if there is any captcha I just resolve it manually.

Is there a config to slow down the downloading processes.

There is not a process to do it automatically. But, you can set batchSize = 1 (which is the default) so that we only download one page at a time. Then go to download.ts file and add the following code at the top of the downloadPage(...) function.

private async downloadPage(linkWithTitle: PageTitleAndLink, pageNumber: number) {
    await waitFor(3000); // in milliseconds
    const { title, link } = linkWithTitle;
    ...
}

Also notice that I have removed the config directory and using .env files instead. Read the updated documentation.

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