Giter Site home page Giter Site logo

focusedwebcrawler's Introduction

Focused Crawler
---------------
This is a web crawler that looks for a keyphrase in a web page statring from a seed URL and in it's child if the phrase is found in the page. This goes till getting 1000 unique relevant URLs with keyphrase or docs crawled upto a depth of 5.
If no key phrase is present then it crawls 1000 unique URLs starting from the seed upto a depth of 5.

Build
-----
Developed in Java using jdk1.8.0_05.
Compiled for jre7 and jre8.
No third party/external libraries used.
Works for https URL only.

Compile and Run
----------------
For windows:
1. Open execute.bat
2. Set the path of jdk bin on this system at the path variable.
3. Set the seed URL at the seed variable.
4. Set the optional key phrase at keyPharse variable.
5. Save and execute execute.bat
6. Response file is generated here as URLsParsed_<timestamp> and URLsWithKey_<timestamp>.

For linux/unix*:
1. Open execute.sh
2. Set the path of jdk bin on this system at the path variable.
3. Set the seed URL at the seed variable.
4. Set the optional key phrase at keyPharse variable.
5. Save and execute execute.sh
6. Response file is generated here as URLsParsed_<timestamp> and URLsWithKey_<timestamp>.

* not tested for linux/unix 

Testing
--------
1000 links crawled without keyphrase:(file: ./ListOfURLs/URLsParsed_no_key.txt)
total response::1025580501 = ~17
total crawl::42579151 = ~0.7
total time:2138447217 = ~35

1000 relevant links found with kp 'index':(file: ./ListOfURLs/URLsWithKey_index_1000.txt & ./ListOfURLs/URLsParsed_index_2403.txt)
total response::1006204631 = ~17
total crawl::13594487 = ~0.2
total time::3477230125 = ~57
URLs parsed/crawled::2403
URLs with key::1000

1000 links crawled with keyphrase 'index':(file: ./ListOfURLs/URLsWithKey_index_468.txt & ./ListOfURLs/URLsParsed_index_1000.txt)
total response::901108646 = ~15
total crawl::48760756 = ~ 0.8
total time:2009623860 = ~33
URLs parsed/crawled::1000
URLs with key::468

*times in microseconds and corresponding minutes
**response is the time taken to send a request and get a response from the web
***crawl is timetaken to parse the page after the response

References
-----------
1.JavaSE Documentation: https://docs.oracle.com/javase/7/docs/
2.Jenkov.com tutorials: http://tutorials.jenkov.com/

focusedwebcrawler's People

Contributors

rajulkumar avatar

Stargazers

 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.