hacker-news-scraper

所属分类:系统/网络安全
开发工具:Ruby
文件大小:0KB
下载次数:0
上传日期:2023-12-19 17:58:38
上 传 者sh-1993
说明:  Hacker News Scraper是一个简单的Ruby程序,它从Hacker新闻中抓取新闻条目,并提供过滤结果的功能。
(Hacker News Scraper simple Ruby program that scrapes news entries from Hacker News and provides functionality for filtering the results.)

文件列表:
bin/
lib/
spec/
.rspec
.rubocop.yml
.ruby-version
DESIGN_DECISIONS.md
Gemfile
Gemfile.lock
LICENSE

# Hacker News Scraper Hacker News Scraper is a simple Ruby program that scrapes news entries from Hacker News and provides functionality for filtering the results. **[hacker_news_scaper.mov](https://github.com/stefanomarch/hacker-news-scraper/blob/master/..%2F..%2FDesktop%2FVideo%20OBS%2Fhacker_news_scaper.mov)** ## Requirements - Ruby 3.2.2 or higher ## Installation Clone this repository and run the following command to install dependencies: ```sh git clone https://github.com/stefanomarch/hacker-news-scraper.git ``` Move into the project directory: ```sh cd hacker-news-scraper ``` Install dependencies: ```sh bundle install ``` Make the script executable: ```sh chmod +x bin/hacker_news_scraper ``` ## Usage To run the program simply execute the following command: ```sh ./bin/hacker_news_scraper ``` This will display the following menu: ```sh HackerNews Scraper 1. Scrape without filters 2. Apply filters 3. Exit ``` ### Scrape without filters This option will scrape the first 30 news entries from the Hacker News homepage and display them in the terminal. ### Apply filters This option will display the following menu: ```sh Filter Options: 1. Filter entries with more than five words in the title ordered by the number of comments first. 2. Filter entries with less than or equal to five words in the title ordered by points 3. Exit ``` ## Tests To run the test suite execute the following command: ```sh bundle exec rspec ``` Test Style with Rubocop: ```sh bundle exec rubocop ```

近期下载者

相关文件


收藏者