linkutils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2021 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HappyResponse

func HappyResponse(resp *http.Response) bool

HappyResponse returns true if we want to continue scraping this thing.

func Hash

func Hash(u *url.URL) string

Hash returns a SHA1 hash of the host and path

func IsNiceFileType

func IsNiceFileType(u *url.URL) bool

IsNiceFileType returns true if the file extension is of type html (or unknown)

func ParseURL

func ParseURL(s string) (*url.URL, error)

ParseURL is a helper function that takes a string url, trims whitespace, parses into a url.URL and finally checks whether it fits our url requirements.

func ScrapeDaTing

func ScrapeDaTing(u *url.URL) bool

ScrapeDaTing gives us a yes/no on whether or not we should scrape the following URL, based on our opinionated filters

Types

This section is empty.

Jump to

Keyboard shortcuts

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