Coder Social home page Coder Social logo

linovaldivia / crawldaddy Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 77 KB

Yet another Java 8 web crawler (ForkJoinPool, RecursiveAction, ConcurrentHashMap, jsoup)

License: MIT License

Java 100.00%
java java8 forkjoin concurrent-programming concurrent-data-structure jsoup jsoup-html recursiveaction webcrawler

crawldaddy's Introduction

crawldaddy: Yet Another Java 8 web crawler

This project is a multithreaded standalone Java application that uses RecursiveActions in a ForkJoinPool along with concurrent data structures to traverse and analyze the pages of a website.

Crawldaddy keeps track of broken links (i.e. links that result in the dreaded HTTP 404 "Not Found" error) as well as external links and external (non-inline imported) scripts used by the site.

Sample output:

Crawling https://www.mizcracker.com...
ForkJoinPool.commonPool-worker-2: VISITING: https://www.mizcracker.com
ForkJoinPool.commonPool-worker-2: VISITING: https://www.mizcracker.com/live/
ForkJoinPool.commonPool-worker-3: VISITING: https://www.mizcracker.com/about/
...
RESULTS:
Total number of unique links : 193
   Number of external links  : 158
Number of broken links       : 0
Number of ext scripts        : 6
EXTERNAL LINKS (158): 
https://www.youtube.com/watch?v=OXY-lYvTMyQ
https://www.vice.com/en_us/contributor/miz-cracker
...
EXTERNAL SCRIPTS (6): 
https://static.squarespace.com/universal/scripts-compressed/common-c38b71de3b9638a00d8c-min.en-US.js
https://www.googletagmanager.com/gtag/js?id=AW-815826109
...
Total crawl time: 5.873 second(s) 

Crawldaddy limits itself to the domain of the input url and will not follow external links (i.e. links that point to resources outside of the domain of the input url).

Running using Maven 3.x

$ mvn verify
...
$ java -jar target/crawldaddy-0.5-jar-with-dependencies.jar <url-to-crawl>

Example:

$ java -jar target/crawldaddy-0.5-jar-with-dependencies.jar https://www.mizcracker.com

crawldaddy's People

Contributors

linovaldivia avatar

Watchers

 avatar  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.