jsonscraper

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JsonScraper

type JsonScraper[T any] struct {
	Source       string
	GetUrl       func(number string) (url string)
	GetData      func(data *T) (metadata *scraper.Metadata, err error)
	GetCover     func(data *T) (coverUrl string)
	GetRename    func(originalname string, metadata *scraper.Metadata) (canonicalName string, shouldRename bool)
	NumberRegexp *regexp.Regexp
}

T: the response data type, e.g. a struct.

func (*JsonScraper[T]) Do

func (js *JsonScraper[T]) Do(dirname string, tmpdir string) (metadata *scraper.Metadata, err error)

func (*JsonScraper[T]) Pre

func (js *JsonScraper[T]) Pre(dirname string) bool

Jump to

Keyboard shortcuts

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