extractor

package
v1.0.85 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetURLsFromJSON

func GetURLsFromJSON(body []byte) ([]string, error)

func IsM3U8 added in v1.0.78

func IsM3U8(resp *http.Response) bool

func IsS3 added in v1.0.79

func IsS3(resp *http.Response) bool

IsS3 checks if the response is from an S3 server

func JSON

func JSON(resp *http.Response) (URLs []*url.URL, err error)

func M3U8 added in v1.0.78

func M3U8(resp *http.Response) (URLs []*url.URL, err error)

func S3 added in v1.0.79

func S3(resp *http.Response) ([]*url.URL, error)

S3 takes an initial response and returns URLs of either files or prefixes at the current level, plus continuation URL if more results exist

func XML

func XML(resp *http.Response, strict bool) (URLs []*url.URL, sitemap bool, err error)

Types

type CommonPrefix added in v1.0.79

type CommonPrefix struct {
	Prefix string `xml:"Prefix"`
}

type S3ListBucketResult added in v1.0.79

type S3ListBucketResult struct {
	XMLName               xml.Name       `xml:"ListBucketResult"`
	Name                  string         `xml:"Name"`
	Prefix                string         `xml:"Prefix"`
	Marker                string         `xml:"Marker"`
	Contents              []S3Object     `xml:"Contents"`
	CommonPrefixes        []CommonPrefix `xml:"CommonPrefixes"`
	IsTruncated           bool           `xml:"IsTruncated"`
	NextContinuationToken string         `xml:"NextContinuationToken"`
}

S3ListBucketResult represents the XML structure of an S3 bucket listing

func S3ProcessResponse added in v1.0.79

func S3ProcessResponse(resp *http.Response) (*S3ListBucketResult, error)

S3ProcessResponse parses an HTTP response into an S3ListBucketResult

type S3Object added in v1.0.79

type S3Object struct {
	Key          string `xml:"Key"`
	LastModified string `xml:"LastModified"`
	Size         int64  `xml:"Size"`
}

Jump to

Keyboard shortcuts

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