Abhijeet-AR / Competitive_Programming_Score_API

API to get user details for competitive coding platforms - Codeforces, Codechef, SPOJ, Interviewbit
MIT License
183 stars 59 forks source link

Add LeetCode platform #1

Closed Abhijeet-AR closed 4 years ago

virtualmanu commented 4 years ago

I have written code for support for leetcode and it works fine. But I have used selenium and herokuapp needs certain configs to run chromedriver. Shall I add a pull request? Check out the code: https://github.com/virtualmanu/Competitive_Programming_Score_API

Abhijeet-AR commented 4 years ago

Sure, open a pull request, I'll review it. But why selenium? Is there any particular reason?

virtualmanu commented 4 years ago

Sure, open a pull request, I'll review it. But why selenium? Is there any particular reason?

Yeah to get ranking on leetcode, you have to hover over the stars span element. To achieve the same, I didn't find any suitable functions in bs4. So I used selenium to emulate the hovering and retrieve div element which is added to html when hover event is triggered.

Abhijeet-AR commented 4 years ago

Sure, open a pull request, I'll review it. But why selenium? Is there any particular reason?

Yeah to get ranking on leetcode, you have to hover over the stars span element. To achieve the same, I didn't find any suitable functions in bs4. So I used selenium to emulate the hovering and retrieve div element which is added to html when hover event is triggered.

Cool!! That's a good idea. Open a PR I'll review it.