GithubHelp home page GithubHelp logo

go-crawler's Introduction

crawler

A simple web crawler that recursively fetches links

Usage

Run this with go run crawler/cmd/crawl [URL...]

NAME:
   crawl - crawl a webpage and recursively print all the links it has on the same subdomain

USAGE:
   crawl [global options] command [command options] [URL...]

VERSION:
   1.0.0

AUTHOR:
   Jeff Dickey <[email protected]>

COMMANDS:
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --max-concurrency workers, -c workers  maximum scrape workers to run simultaneously (default: 1)
   --max-depth depth, -d depth            maximum depth of page from starting URL. Set to "-1" for no limit. (default: -1)
   --max-retries times, -r times          maximum times to retry a given URL before displaying an error (default: 0)
   --halt                                 stop on first error (not included successful retries) (default: false)
   --help, -h                             show help (default: false)
   --version, -v                          print the version (default: false)

Example run:

$ go run crawler/cmd/crawl -d 0 https://google.com
https://google.com/preferences%3Fhl=en
https://google.com/search%3Fie=UTF-8&q=Susan+B.+Anthony&oi=ddle&ct=144864050&hl=en&sa=X&ved=0ahUKEwj1z-Lx5dTnAhXO854KHUy1CYcQPQgD
https://google.com/advanced_search%3Fhl=en&authuser=0
https://google.com/intl/en/ads/
https://google.com/services/
https://google.com/intl/en/about.html
https://google.com/intl/en/policies/privacy/
https://google.com/intl/en/policies/terms/

Testing

Test with go test ./...

Code Layout

go-crawler's People

Contributors

jdx avatar

Watchers

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