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

submit not receive time beat ratio any more

Open zcmartian opened this issue 6 years ago • 5 comments

when i use submit command, it doesn't reveive time beat ratio any more. instead i receive a message saying "[WARN] Failed to get submission beat ratio."

zcmartian avatar Feb 02 '19 03:02 zcmartian

leetcode has changed the chart field name. In plugins/leetcode.js on line 339, need to update re = body.match(/distribution_formatted:\s('[^']+')/); to re = body.match(/runtimeDistributionFormatted:\s('[^']+')/);

Another suggestion is to include the distribution bucket of the submission itself while counting the beating percentile to make it more align with what we see from the web page, which is in commands/submit.js on line 79, change if (parseFloat(score[0]) > myRuntime) to if (parseFloat(score[0]) >= myRuntime)

Thanks~

smrook avatar Feb 02 '19 07:02 smrook

@smrook sounds great! would you mind sharing your fixes in the next release?

skygragon avatar Feb 03 '19 02:02 skygragon

I am still facing this issue.

[WARN] Failed to get submission beat ratio.

Could someone please release a new All In One binary. Thanks

ketankr9 avatar Mar 02 '19 08:03 ketankr9

Same bug here.

cosmozhang avatar Jun 08 '19 16:06 cosmozhang

same bug here

edte avatar Jul 11 '22 11:07 edte