scraper

package
v0.0.0-...-3dbe2af Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BadHTTPStatus is when an HTTP request is made which does not return http.StatusOK
	BadHTTPStatus = "Bad HTTP status return"

	// MetadataNotFound is when the metadata could not be located when parsing HTTP content
	MetadataNotFound = "Could not locate metadata for programme"

	// CouldNotParseURL is when a given URL could not be parsed
	CouldNotParseURL = "Could not parse URL"

	// NotTVSeries is when trying to get data for a series but the link isn't for a series
	NotTVSeries = "Not a TV Series"

	// IsAnEpisode is when trying to get data for a series but the link is actually an episode.
	// This can happen for one-offs and movies
	IsAnEpisode = "Link is to an episode"
)

Variables

This section is empty.

Functions

func ContentFromURL

func ContentFromURL(url string) (string, error)

ContentFromURL gets the HTML content from a URL

func ExtractEpisode

func ExtractEpisode(episodeURL string, content string) (*types.Episode, error)

func ExtractSeries

func ExtractSeries(showURL string, content string) (*types.Series, error)

ExtractSeries obtains metadata for a series (aka show or programme).

func ExtractShows

func ExtractShows(content string) (*types.Shows, error)

ExtractShows obtains metadata for all shows

Types

This section is empty.

Jump to

Keyboard shortcuts

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