A script get the highest voted questions from StackOverflow.com and print its best anwser url.
This tool is a part of project I learnt about crawler.
Project is created with:
- Python version: 3.8.10
- Stack Exchange API version: 2.3
Learn more about latest API version.
stackoverflow API keystore in config file (i.e.myconfig.cfg) located in the same directory of this script.
As document said, an API key is NOT compulsory to retrieve question/answer, but for more API quota in this case.
If an application does have an access_token, then the application is on a distinct user/app pair daily quota (default size of 10,000).
To run this project, spin up terminal locally:
$ cd ../stackoverflow-top-qa
$ python3 stackoverflow.py [N] [LABEL]$ python3 stackoverflow.py 4 pythonResult
- What does the "yield" keyword do?
https://stackoverflow.com/questions/231767/what-does-the-yield-keyword-do#231855 - What does if name == "main": do?
https://stackoverflow.com/questions/419163/what-does-if-name-main-do#419185 - Does Python have a ternary conditional operator?
https://stackoverflow.com/questions/394809/does-python-have-a-ternary-conditional-operator#394814 - What are metaclasses in Python?
https://stackoverflow.com/questions/100003/what-are-metaclasses-in-python#6581949