Giter Club home page Giter Club logo

capstone-scraper's Introduction

Web Scraping with Ruby and Nokogiri

In this project, I build my own scraper. The main goal is to scrape information from https://www.jumia.mg/maisons-a-vendre&xhr=9jdcu and to store data in a json file.

screenshoot

Web Scraping with Ruby and Nokogiri

  • Web scraping: is a programmatic method of extracting data from websites. When you browse the web you consume a ton of publicly available information. As a user, all of this information is presented to you as unstructured data in the form of HTML documents. Now imagine, what if you could take all of these pages of and turn them into structured data, pick out the pieces you like and export it all to a database or spreadsheet. There are many ways to scrape data from websites but in this project I have built my own sraper.

Getting Started

You can get a local copy of the repository please run the following commands on your terminal:

$ cd <folder>

$ git clone https://github.com/rindrajosia/capstone-scraper.git

To limit the numbers of page scraped:

  • Go to the bin folder and open the main file then change "last_page" with the number of the page that you want to scrape:

screenshoot

To run the program:

Step 1 - Install dependencies:

  • In your terminal go to the folder you have saved the repository and type:
  • bundle install

Step 2 - then go to bin folder and type: ruby main

To check information result:

  • Go to '/tmp/search_result.json'

Testing with RSpec:

  • To test it you should go to your terminal on the folder you saved and type: rspec

Built With

  • Ruby
  • Nokogiri
  • Rspec

Live Demo

Live Demo Link

Authors

๐Ÿ‘ค Rindra Josia

๐Ÿค Contributing

Contributions, issues and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a โญ๏ธ if you like this project!

Acknowledgments

  • Project from Microverse
  • Originally taken from The Odin Project

capstone-scraper's People

Contributors

rindrajosia avatar

Stargazers

 avatar

Watchers

 avatar

capstone-scraper's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.