linkextractor

package module
v0.0.0-...-1f09f8e Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2018 License: MIT Imports: 4 Imported by: 2

README

go-linkextractor

tiny library to extract links from a web page

About this project

This poject is a very tiny library to scrape a website and return a list of links on the given web page. It will only return links that macthes the scheme http or https. Also, it sanatizes the links to make sure all links are in the same format (e.g. relative paths to an absolute URL).

Usage

Take a look to the examples folder to find a short example of how to deal with the library.

Install

Go to gopkg.in to get all information about how to install it.

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WebsiteLinks struct {
	URL   *url.URL
	Links []*url.URL
}

WebsiteLinks is a list of links on a website page

func ExtractLinks(URL *url.URL) (*WebsiteLinks, error)

ExtractLinks scrapes a specific URL and returns all links on the page

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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