vv13 / leetcode-problems-crawler

MIT License
6 stars 4 forks source link

How to crawl the premium question with the account credentials #18

Closed MFYDev closed 1 year ago

MFYDev commented 1 year ago

Hi, glad to find this project as I was working on doing everything through python from my end, we almost achieved the same function.

I only have one question: is there any possibility that we can use our own account credentials to pull the premium questions' data?

I was trying to do this through python but it never works.

Looking forward to hearing your ideas and thoughts!

vv13 commented 1 year ago

The script can only fetch public questions, and my account doesn't have access to fetch premium questions.

For one-time access, just login to the page and copy requests, such as cURL or fetch, that include credentials. Then, adapt the getQuestion and getProblems to handle the new response data.

To get credentials automatically, you should do simulate login, puppeteer can help you to do this.