GithubHelp home page GithubHelp logo

scraper's Introduction

#Introduction This maven based project is a quick test to scrape a webpage and download any products listed on the page. After downloading html it looks for product details and print on system console in JSON format. It uses Junit and Java 1.8. It also uses JSoup for scraping the webpage. JSoup is selected over otehr options for its ease of use, it's tolerance to errors in html structure and it's good support for css selectors. If html structure is changed then you can provide the new css selectors in application.properties file which is currently located in resources folder. These selectors are explained in javadoc of GroceryProductScraper.java

#How to Build and Execute Code is tested with Java 1.8.0_73 and Maven 3.3.9. Other similar recent versions are likely to work. After cloning the respository, you can use following commands:

	$mvn clean package

and then:

	$java -jar target\scrapper-0.0.1-SNAPSHOT.jar

or:

	$java -jar target\crapper-0.0.1-SNAPSHOT.jar > products.json

You can provide different url for different environments using this:

	java -jar target\scrapper-0.0.1-SNAPSHOT.jar {fully qualified url to the products page}

You may also want to copy paste the JSON into this JSON Viewer.

scraper's People

Contributors

jaleen avatar

Watchers

 avatar

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.