Code Monkey home page Code Monkey logo

parallel-crawler's Introduction

parallel-crawler

Description

This tool makes a request to the given url(s) and prints the md5 hash of the response body along with the formatted url address.

The tool uses fan-out and fan-in pattern to send out the requests then "collect" the responses. It utilizes waitgroups, goroutines and channels to achieve this.

Usage of the tool

./myhttp -parallel [number of parallel requests (number)] [address1] [address2] [...]


Example:

./myhttp -parallel 3 google.com facebook.com yahoo.com yandex.com twitter.com

Expected response:

2023/05/03 19:55:39 https://facebook.com d7dd8b081fc735d1d19d8170f812f70a
2023/05/03 19:55:39 https://yandex.com 8659c2f05bfc7b5dbc9b55a2b28edcc3
2023/05/03 19:55:39 https://google.com 4a52893a0e5c9bfce350fa1d98baea3f
2023/05/03 19:55:39 https://twitter.com 13d3ee4892a3a7ed0fa861c83b5c7820
2023/05/03 19:55:39 https://yahoo.com fd6b12d1f5cab48ec2052381919d3c5d

The parallel flag is optional.

parallel-crawler's People

Contributors

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