A Python command line application that scraps Hacker News and returns the top posts.
Firstly, make sure Python is installed.
Then install the package:
pip install -e .To install requirements and run tests:
pip install -r test_requirements
pytest testsCommand to run in the CLI (where n is the number of posts and is a positive integer <= 100):
$ hackernews --posts nFor CLI help:
$ hackernews --helpBeautifulSoup4: Used to scrape HackerNews
Click: A package for creating command line interfaces with minimal code
Urllib3: An Http client to retrieve html to be scraped
Validators: Used to validate the URI
Pytest: A testing framework for testing applications and libraries
Pytest-Mock: Mocking library for testing, can mock objects to increase ease of testing