Command Line tool for browsing HackerNews articles
Py Hacker News
A Simple command line tool written in python to browse Hacker news.
Hacker News is a social news website focusing on computer science and entrepreneurship.
py_hacker_news is a command line tool which fetches and displays results from Hackernews website. You can browse latest, top and past articles from the command line itself.
py_hacker_news is written in python and can be installed with pip.
This program only supports python3
pip3 install py_hacker_news --user
You need to make sure that
~/.local/bin is in your PATH variable.
To add this to the PATH try
You can also download source and try
pip install -r requirements.txt
python3 -m hnews
The tool can be run from the terminal using the
You can pass in various arguments to browse different parts of the Hackernews website.
The tool supports the following arguments:
- type - Type of news to fetch. Options are news, latest, past. Default is news
- number - number of pages to fetch. Each pages contains 30 articles. Default is 1
- age - age of the pages to fetch. It only works is 'past' flat is passed.
- proxy - network proxy if you are using a proxy server.
hnews - displays 30 popular articles from hackernews
hnews -n 5 - displays 150 (30 * 5) popular articles from hackernews
hnews -t latest - displays 30 newest articles from hackernews
hnews -t past -a 20 -n 2 - displays 60 (30 * 2) articles that were on front page 20 days ago from hackernews
hnews -p https://proxy_address:port - uses this proxy to connect to fetch articles
The tool automatically used proxy from environment variables if no proxy is provided in args. If
a proxy flag is passed, that value is used instead. To set proxy environment variable:
In case of any trouble or if you think that the code could be improved, please open an issue of github.
You can also contact me at firstname.lastname@example.org
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size py_hacker_news-1.0.4.tar.gz (4.9 kB)||File type Source||Python version None||Upload date||Hashes View|
|Filename, size py_hacker_news-1.0.4-py3-none-any.whl (7.2 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
Hashes for py_hacker_news-1.0.4-py3-none-any.whl