8000 GitHub - fspv/python-leetcode at 4667f6ce503a62394a61546d1360762fccae4b69
[go: up one dir, main page]

Skip to content

fspv/python-leetcode

Repository files navigation

Leetcode API implementation.

build

This implements methods that are available publicly for leetcode. There is already an implementation of them in form of CLI [1], but it has a list of disadvantages.

  1. It is written in JS

  2. Even for JS in order to reuse it you have to invoke it via CLI

  3. It is not supported very well, so authentication doesn't work anymore

So I have decided to create my own implementation and here is it.

Using the swagger file you'll be able to generate the code for any language you like and start using leetcode API directly from your code.

Just keep in mind that swagger doesn't really support cookie auth, which is needed in order to use LC API. If you use python you can just use the generated code from this repo. Otherwise you'll have to implement something like fix_cookies.patch for your target language.

You can find examples of usage in example.py

Autogenerated by swagger documentation can be found here.

[1] https://github.com/skygragon/leetcode-cli

About

python client for leetcode api

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages

0