skygragon / leetcode-cli

A cli tool to enjoy leetcode!
MIT License
3.65k stars 457 forks source link

http error 404 #145

Closed Joseph516 closed 5 years ago

Joseph516 commented 5 years ago

Always show http error 404 when test code.

Details: [TRACE] initializing all plugins [TRACE] found plugin: cache=default [TRACE] found plugin: leetcode=default [TRACE] found plugin: retry=default [TRACE] inited plugin: leetcode [TRACE] inited plugin: retry [TRACE] inited plugin: cache [DEBUG] cache hit: problems.json [DEBUG] cache hit: 1.two-sum.algorithms.json

Input data: [1,2] 3 [DEBUG] running leetcode.testProblem ⠋ Sending code to judge[TRACE] REQUEST %s { url: 'https://leetcode.com/problems/two-sum/interpret_solution/', headers: { Cookie:

, 'X-CSRFToken': , 'X-Requested-With': 'XMLHttpRequest', Origin: 'https://leetcode.com', Referer: 'https://leetcode.com/problems/two-sum/description/' }, body: { data_input: '[1,2]\n3', lang: 'cpp', question_id: 1, test_mode: false, typed_code: "/*\n * @lc app=leetcode id=1 lang=cpp\n *\n * [1] Two Sum\n *\n * https://leetcode.com/problems/two-sum/description/\n *\n * algorithms\n * Easy (39.53%)\n * Total Accepted: 1.3M\n * Total Submissions: 3.2M\n * Testcase Example: '[2,7,11,15]\\n9'\n *\n * Given an array of integers, return indices of the two numbers such that they\n * add up to a specific target.\n * \n * You may assume that each input would have exactly one solution, and you may\n * not use the same element twice.\n * \n * Example:\n * \n * \n * Given nums = [2, 7, 11, 15], target = 9,\n * \n * Because nums[0] + nums[1] = 2 + 7 = 9,\n * return [0, 1].\n * \n * \n * \n * \n */\n#include \nusing namespace std;\n\nclass Solution {\npublic:\n vector twoSum(vector& nums, int target) {\n/*\n\t\t\tvector res;\n\t\t\tfor (int i = 0; i < nums.size(); i++) {\n\t\t\t\tfor (int j = i+1; j < nums.size(); j++) {\n\t\t\t\t\tif ((nums[i] + nums[j]) == target) {\n\t\t\t\t\t\tres.push_back(i);\n\t\t\t\t\t\tres.push_back(j);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\treturn res;*/\n\t\t\treturn nums;\n }\n};\n" }, method: 'POST', json: true, _delay: 1, callback: [Function] } [TRACE] REQUEST %s make request https://leetcode.com/problems/two-sum/interpret_solution/ ⠸ Sending code to judge[TRACE] REQUEST %s onRequestResponse https://leetcode.com/problems/two-sum/interpret_solution/ 404 { date: 'Sun, 23 Dec 2018 09:06:19 GMT', 'content-type': 'text/html; charset=utf-8', 'transfer-encoding': 'chunked', connection: 'close', 'set-cookie': , vary: 'Accept-Encoding, Cookie', 'x-frame-options': 'SAMEORIGIN', 'strict-transport-security': 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options': 'nosniff', 'expect-ct': 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"', server: 'cloudflare', 'cf-ray': '48d9abe78a62c392-SIN' } [TRACE] REQUEST %s reading response's body [TRACE] REQUEST %s finish init function https://leetcode.com/problems/two-sum/interpret_solution/ ⠴ Sending code to judge[TRACE] REQUEST %s response end https://leetcode.com/problems/two-sum/interpret_solution/ 404 { date: 'Sun, 23 Dec 2018 09:06:19 GMT', 'content-type': 'text/html; charset=utf-8', 'transfer-encoding': 'chunked', connection: 'close', 'set-cookie': , vary: 'Accept-Encoding, Cookie', 'x-frame-options': 'SAMEORIGIN', 'strict-transport-security': 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options': 'nosniff', 'expect-ct': 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"', server: 'cloudflare', 'cf-ray': '48d9abe78a62c392-SIN' } [TRACE] REQUEST %s end event https://leetcode.com/problems/two-sum/interpret_solution/ [TRACE] REQUEST %s has body https://leetcode.com/problems/two-sum/interpret_solution/ 32509 [TRACE] REQUEST %s invalid JSON received https://leetcode.com/problems/two-sum/interpret_solution/ [TRACE] REQUEST %s emitting complete https://leetcode.com/problems/two-sum/interpret_solution/ [DEBUG] http error: 404
Joseph516 commented 5 years ago

I've found the answer! It's the unconfirmed email for the leetcode.