Skip to content

cherryt/HackerNewsScraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HackerNewsScraper

A Python command line application that scraps Hacker News and returns the top posts.

Installation

Firstly, make sure Python is installed.

Then install the package:

pip install -e .

Run Tests

To install requirements and run tests:

pip install -r test_requirements
pytest tests

Usage

Command to run in the CLI (where n is the number of posts and is a positive integer <= 100):

$ hackernews --posts n

For CLI help:

$ hackernews --help

Libraries Used

BeautifulSoup4: 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages