leetcode-downloader icon indicating copy to clipboard operation
leetcode-downloader copied to clipboard

Download your accepted LeetCode submissions

Results 3 leetcode-downloader issues
Sort by recently updated
recently updated
newest added

HTTP 429 too many requests

[{"_id":"66ed4380919e8f361805c274","body":"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 \ud83d\ude04 ","issue_id":1714334785885,"origin_id":412732029,"user_origin_id":1315101,"create_time":1534213413,"update_time":1534213434,"id":1726825344265,"updated_at":"2024-09-20T09:42:24.265000Z","created_at":"2024-09-20T09:42:24.265000Z"},{"_id":"66ed4380919e8f361805c275","body":"@yangshun Thanks! This tools has been very helpful.","issue_id":1714334785885,"origin_id":412732753,"user_origin_id":1016390,"create_time":1534213657,"update_time":1534213657,"id":1726825344269,"updated_at":"2024-09-20T09:42:24.268000Z","created_at":"2024-09-20T09:42:24.268000Z"},{"_id":"66ed4380919e8f361805c276","body":"Same problem, can you solve it? I do not have knowledge in JS.","issue_id":1714334785885,"origin_id":1410097407,"user_origin_id":9346460,"create_time":1675160263,"update_time":1675160263,"id":1726825344273,"updated_at":"2024-09-20T09:42:24.272000Z","created_at":"2024-09-20T09:42:24.272000Z"}] comment

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)...

submissions.json is empty: [ ]

[{"_id":"66ed4380919e8f361805c277","body":"This is due to the format of the response from 'https:\/\/leetcode.com\/api\/problems\/all\/' has been changed.\r\n\r\nRemove the line: 30 in `fetch-submissions.js`, it will works.\r\n\r\n```js\r\n.then(response => {\r\n const questions = response.data.stat_status_pairs;\r\n const promises = [];\r\n questions\r\n \/\/ .filter(question => question.status === 'ac')\r\n .forEach(question => {\r\n console.log(question);\r\n const id = question.stat.question_id;\r\n```","issue_id":1714334785889,"origin_id":381315240,"user_origin_id":20788456,"create_time":1523696781,"update_time":1523696781,"id":1726825344555,"updated_at":"2024-09-20T09:42:24.554000Z","created_at":"2024-09-20T09:42:24.554000Z"},{"_id":"66ed4380919e8f361805c278","body":"PRs are welcome \ud83d\ude04 ","issue_id":1714334785889,"origin_id":386827512,"user_origin_id":1315101,"create_time":1525546829,"update_time":1525546829,"id":1726825344559,"updated_at":"2024-09-20T09:42:24.558000Z","created_at":"2024-09-20T09:42:24.558000Z"},{"_id":"66ed4380919e8f361805c279","body":"I am experiencing a similar issue. The process exits with following log -\r\n\r\n```\r\n...\r\n...(stripped)...\r\n...\r\nTimeout for 4-median-of-two-sorted-arrays\r\nTimeout for 3-longest-substring-without-repeating-characters\r\nTimeout for 2-add-two-numbers\r\nTimeout for 1-two-sum\r\n\r\nDone fetching\r\n```\r\n\r\nThe file `submissions.json` is empty.","issue_id":1714334785889,"origin_id":417647451,"user_origin_id":10729033,"create_time":1535718174,"update_time":1535720256,"id":1726825344563,"updated_at":"2024-09-20T09:42:24.562000Z","created_at":"2024-09-20T09:42:24.562000Z"},{"_id":"66ed4380919e8f361805c27a","body":"Yeah Its showing Timeout for every submissions\r\n","issue_id":1714334785889,"origin_id":627277455,"user_origin_id":29516182,"create_time":1589282197,"update_time":1589282197,"id":1726825344568,"updated_at":"2024-09-20T09:42:24.567000Z","created_at":"2024-09-20T09:42:24.567000Z"},{"_id":"66ed4380919e8f361805c27b","body":"For me the solution was using https:\/\/github.com\/bonfy\/leetcode.","issue_id":1714334785889,"origin_id":627291708,"user_origin_id":4254450,"create_time":1589283813,"update_time":1589283813,"id":1726825344571,"updated_at":"2024-09-20T09:42:24.571000Z","created_at":"2024-09-20T09:42:24.571000Z"}] comment

After `http_proxy= https_proxy= node fetch-submissions.js` I got in the console: ``` Done fetching ``` but the resulting `submissions.json` (and `zero-submissions.json`) files contain only `[]`. The cookie is set and I...

Unhandled promise rejection (rejection id: 2): Error: connect EINVAL 0.0.31.182:443

[{"_id":"66ed436a7005e7f2ab115b00","body":"Catching the error gives me:\r\n\r\n```\r\n Error: connect EINVAL 0.0.31.182:443 - Local (0.0.0.0:0)\r\n at Object._errnoException (util.js:1022:11)\r\n at _exceptionWithHostPort (util.js:1044:20)\r\n at internalConnect (net.js:971:16)\r\n at GetAddrInfoReqWrap.emitLookup [as callback] (net.js:1106:7)\r\n at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:97:10)\r\n code: 'EINVAL',\r\n errno: 'EINVAL',\r\n syscall: 'connect',\r\n address: '0.0.31.182',\r\n\r\n ...\r\n\r\n currentUrl: 'https:\/\/8118\/https:\/\/leetcode.com\/api\/problems\/all\/'\r\n```","issue_id":1714334785893,"origin_id":372222956,"user_origin_id":4254450,"create_time":1520841937,"update_time":1520841937,"id":1726825322285,"updated_at":"2024-09-20T09:42:02.285000Z","created_at":"2024-09-20T09:42:02.285000Z"},{"_id":"66ed436a7005e7f2ab115b01","body":"Solved by temporarily turning off proxy (it's not handled apparently):\r\n\r\n`http_proxy= https_proxy= node fetch-submissions.js`","issue_id":1714334785893,"origin_id":372223180,"user_origin_id":4254450,"create_time":1520841998,"update_time":1520841998,"id":1726825322289,"updated_at":"2024-09-20T09:42:02.289000Z","created_at":"2024-09-20T09:42:02.289000Z"}] comment

I followed the instructions given and `node fetch-submissions.js` gives me the following: ``` (node:18346) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: connect EINVAL 0.0.31.182:443 - Local (0.0.0.0:0) (node:18346) [DEP0018]...