GithubHelp home page GithubHelp logo

kraw's Introduction

Kraw

Kraw is a tiny concurrent crawler skeleton, used as a demo or starting point for more complex projects.

What it does is start from the url given, search for links in its response that contain a predefined keyword, and repeat until the visiting limit has been reached.

Build

cd src/kraw
go build kraw.go

Run

Usage: kraw start_url keyword visiting_limit [async|sync]"
Example usage: ./kraw http://wikipedia.org wiki 50 async

Benchmarks

The app has a switch to run in synchronized, ie. visiting urls one after another. In async mode however, new goroutines are started for new requests, resulting in significant performance improvements, since the program doesn't stop while waiting for responses.
A quick and unscientific result of starting the app from a github page and limiting to 100 pages:
==> async: 7.6 s
==> sync: 70.1 s

Please feel free to submit PRs for improvements or fixes.

kraw's People

Stargazers

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