scrape

package module
v0.0.0-...-c0d81ed Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

README

go-scrape

    DefaultOutputPath = "video"

    //如果需要使用代理请注册代理地址
    //RegisterProxy("https://localhost:10808")
    //RegisterProxy("http://localhost:10808")
	e := RegisterProxy("socks5://localhost:10808")
	if e != nil {
		return
    }
    //创建搜刮器
	grab2 := NewGrabJavbus()
	grab3 := NewGrabJavdb()
	scrape := NewScrape(GrabOption(grab2), GrabOption(grab3), OptimizeOption(true))

    //需要查找的番号:多次或单次调用皆可
	e = scrape.Find("abp-891")
	e = scrape.Find("abp-892")

    //遍历结果
	e = scrape.Range(func(key string, content Content) error {
		t.Log("key", key, "info", content)
		return nil
	})
	//或输出到DefaultOutputPath
	e = scrape.Output()

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CacheOption = internal.CacheOption

CacheOption ...

View Source
var ConfigOption = internal.ConfigOption
View Source
var ProxyOption = internal.ProxyOption

Functions

This section is empty.

Types

type Content

type Content struct {
	From          string //where this
	Language      string
	Uncensored    bool
	ID            string
	Title         string
	OriginalTitle string
	Year          string
	ReleaseDate   time.Time
	Studio        string
	Director      string
	MovieSet      string
	Plot          string
	Genres        []*Genre
	Actors        []*Star
	Poster        string
	Thumb         string
	Sample        []*Sample
	Publisher     string
}

Content ...

type Genre

type Genre struct {
	URL     string
	Content string
}

Genre ...

type Options

type Options = internal.Options

Options ...

type Result

type Result map[string]interface{}

type Sample

type Sample struct {
	Index int
	Thumb string
	Image string
	Title string
}

Sample ...

type Star

type Star struct {
	Image string
	Link  string
	Name  string   //english name
	Alias []string //other name(katakana,...)
}

Star ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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