Coder Social home page Coder Social logo

rishabhsverma93 / leetcode-best-answers Goto Github PK

View Code? Open in Web Editor NEW

This project forked from liumingzhang/leetcode-best-answers

0.0 2.0 0.0 33.51 MB

Top voted answers from leetcode discussion forum for leetcode problems

Home Page: https://itunes.apple.com/us/app/leetcoder/id1069760709?mt=8

Python 6.87% Jupyter Notebook 93.13%

leetcode-best-answers's Introduction

Leetcode Best Answers

How

Selenium driver is used to fetch the urls of top voted answers for each question. urls.txt is generated. answers.py parses this file and write answers into a MongoDB collection. You can use urls.txt to do your own thing. Its format is:

question_num:number_of_answer_count_follows_this_line
answer_url
answer_url
...

number_of_answer_count_follows_this_line is usually 10

Improvement

Selenium driver is used to get urls.txt because the discussion forum does not order the answers by votes by default. To do that you need to log in and choose that option. Since that option will be remembered by the server, it's not necessary to use the driver anymore. requests can be used instead.

Note

All answers in the document are attributed to their authors. If you see your answers in there and would rather your answer not be included, send me a note at [email protected].

Also be responsible if you use this script to crawl leetcode. Use time.sleep.

App

There is an app too! Leetcoder.

Check out GeeksforGeeks Reader as well!

Feedback

Just open an issue.

leetcode-best-answers's People

Contributors

gnijuohz avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.