LeetQuery
A library for retriving Human Resource information from Leetcode.
Install
pip install leetquery
Usage
Retrieving User Submissions
Just enter user name and limit of query!
from leetquery.user import get_submissions
submissions = get_submissions(username="syhaung", limit=12)
return value:
["question1", "question2", ...]
For Problems
Retrieving Problem Discription
Just enter probelm nameSlug and get the problem discription in HTML~~
from leetquery.problem import get_discription
submissions = get_discription(problemname="two-sum")
return value:
<p>Given an array of integers <code>nums</code> and an integer <code>target</code>, return <em>indices of the two numbers such that they add up to <code>target</code></em>.</p>
...
Retrieving Problem Statistics
Get the statistics for the problem in a JSON format, help you quantize difficulties
from leetquery.problem import get_stats
stat = get_stats("two-sum")
return value:
{
'totalAccepted': '10.4M',
'totalSubmission': '20.6M',
...
}