This a scraper using Ruby and also after scraping the web it export a CSV file into the csv folder.
I chose to scraper "EL Comercio" because it is the most important newspaper in my country for more than 181 years since its creation. This newspaper has generated a lot of discrepancy among citizens in recent years.
Definition:
"Data scraping is a technique in which a computer program extracts data from human-readable output coming from another program."
The web page that I scraped is:
β To have a version on you local machine:
- Clone this repository.
- Open a terminal on the containing folder of this project.
- Install all the dependencies with this commandβ on the terminal:
bundle install
β
- You can also use the Live Demo to see it on action. β Live Demo β
- Execute the following instruction on terminal.
ruby bin/main.rb
- You can check the csv folder to see the the csv file.
π¨ Jasem Valencia
- Github: @JasemDuncan
- Twitter: @JasemValencia
- Linkedin: @JasemDuncan
This folder contains a file to test the methods the csv_spec.rb and web_scraper_spec.rb files.
Run the following command to check the results.
rspec spec/csv_spec.rb
To test the csv class methods.
rspec spec/web_scraper_spec.rb
To test the web_scraper class methods.
Contributions, issues and feature requests are welcome!
Feel free to check the issues page.
Give a βοΈ if you like this project!
This project is MIT licensed. This project is for Educational purposes.