Coder Social home page Coder Social logo

web-crawler's Introduction

simple web-crawler
It's purpose is to crawl simple.wikipedia.org'
------------------

Run:
1. need to intall curl lib 
2. $ make curlpp
3. $ make
4. $ ./web-crawler --crawl http://simple.wikipedia.org/wiki/Main_Page
5. $ ./web-crawler --stat data/pagesData_total.txt

While crawling app creates restore-points
If the crawling was interrupted - you can resume crawling from restore point.
Just run ./web-crawler --resume-crawl restore_point_file
Example: Just run  $ ./web-crawler --resume-crawl data/pagesData_5

Options:
--crawl START_URL - crawl starting with start url and obtain inforamtion for pages.
For each page we obtain: outgoing links,  all pages that refers to curren (incoming links),  
distance inclicks from the start page,  size of the page in bytes.

--resume-crawl FILE - the same as --crawl,  but we restore crawler's internal state from FILE.

--stat FILE - read the inforamtion about pages obtained while crawling and separate different data,  
calculate Page Rank for each page. 
All the data are stored into dir data/
Prints top 20 pages by Page Rank.

Application writes log into file log-crawl.txt while crawling and into log-stat.txt while running with option --stat.

Only links matching pattern "(.*simple\\.wikipedia\\.org)?(/wiki/.*?)(#.*)?" are downloaded.
All trailing text after # is omitted. And all such links are counted as one link.

------------------

Draw histogrmas: 
python drawHists.py data/pageSize.txt data/pageInLinks.txt data/pageOutLinks.txt data/pageDistances.txt
This script will show you Histogram of pages' sizes, Histogram of incoming links for pages, Histogram of outgoing links for pages and will save Histogram of distances from main page in clicks into file pageDistances.png

web-crawler's People

Contributors

asanakoy avatar

Stargazers

 avatar Amarin Boonkirt avatar HumanG33k avatar Giovanni Martins 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.