riplink

command module
v0.0.0-...-ca3b3db Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

README

Build Status Coverage Status Go Report Card

H.R.E.F.

riplink finds dead links on the web. It's useful for double-checking web pages for incorrect, or dead web links.

Inspired by Wikimedia and the Internet Archive fixing broken links on Wikipedia.

Installing

$ go get github.com/mschwager/riplink

Using

By default riplink will only print links to pages that return something other than an HTTP 2XX.

If we specify the -verbose flag it will print all links:

$ riplink -url https://google.com -verbose
https://www.google.com/intl/en/options/ 200
https://www.google.com/imghp?hl=en&tab=wi 200
https://google.com/intl/en/policies/terms/ 200
https://google.com/intl/en/ads/ 200
https://google.com/services/ 200
...

The -depth flag can be used to recurse into discovered links:

# Follow links up to 3 pages deep
$ riplink -url https://google.com -depth 3
...

The -same-domain flag can be used to avoid querying links from other domains:

# Avoid links that aren't on google.com
$ riplink -url https://google.com -same-domain
...

If you're looking for specific HTTP return codes you can use the -http-code flag:

# Only output links that return HTTP 302
$ riplink -url https://google.com -http-code 302
...

Testing

$ go test ./...

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
src

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL