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

HTTP 429 too many requests #4

Open
sfdye opened this issue Aug 14, 2018 · 3 comments
Open

HTTP 429 too many requests #4

sfdye opened this issue Aug 14, 2018 · 3 comments

Comments

@sfdye
Copy link

sfdye commented Aug 14, 2018

I can only download at most 60 submissions. Maybe the script should respect the leetcode API rate limit?

{ Error: Request failed with status code 429
    at createError (/Users/xxx/Projects/leetcode-downloader/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/Users/xxx/Projects/leetcode-downloader/node_modules/axios/lib/core/settle.js:18:12)
    at IncomingMessage.handleStreamEnd (/Users/xxx/Projects/leetcode-downloader/node_modules/axios/lib/adapters/http.js:191:11)
    at IncomingMessage.emit (events.js:187:15)
    at endReadableNT (_stream_readable.js:1081:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
  config:
   { adapter: [Function: httpAdapter],
     transformRequest: { '0': [Function: transformRequest] },
     transformResponse: { '0': [Function: transformResponse] },
     timeout: 0,
     xsrfCookieName: 'XSRF-TOKEN',
     xsrfHeaderName: 'X-XSRF-TOKEN',
     maxContentLength: -1,
     validateStatus: [Function: validateStatus],
     headers:
      { Accept: 'application/json, text/plain, */*',
        Cookie:
@yangshun
Copy link
Owner

yangshun commented Aug 14, 2018

Hmm ok I'll try to find time to add a limit the concurrent requests, or you could submit a PR if you have time 😄

@sfdye
Copy link
Author

sfdye commented Aug 14, 2018

@yangshun Thanks! This tools has been very helpful.

@GoingMyWay
Copy link

Same problem, can you solve it? I do not have knowledge in JS.

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