The Hacker News API allows individuals to retrieve news information on their website:
-
The ability to find the newest news.
-
Find the latest comments on the website.
-
Search for profile changes that a user has made.
Before you begin this guide, you need the following:
-
You need to set up a local development environment for Python 3. How To Install Ubuntu ?
-
A text editor that you will be comfortable using: Sublime Text, Atom, Visual Studio Code.
-
You need a Hacker News account.
-
You need to install Requests using PIP in Terminal.
-
Press CTRL + ALT + T on your keyboard and type:
-
PIP install requests.
-
GET - Requests a resource at the requested URL.
-
OPTIONS - Indicates which techniques are supported.
-
HEAD - Returns meta data from the requested URL.
- Link To Guide: Click Me
-
Link: Click Me.
-
Install: Python 3.
-
Install: Firefox or Chrome.
-
Run: "pip install virtualenv".
-
Run: "virtualenv venv".
-
Run: "source venv/bin/activate".
-
Run: "pip install -r requirements.txt".
-
Run: "python3 hackernewstep2.py".