scraper

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2020 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JAVBUSCENSORED      = "JAVBUSCENSORED"
	JAVBUSUNCENSORED    = "JAVBUSUNCENSORED"
	JAVBUSCENSOREDURI   = "actresses/%d"
	JAVBUSUNCENSOREDURI = "uncensored/actresses/%d"
	JAVDBCENSORED       = "JAVDBCENSORED"
	JAVDBUNCENSORED     = "JAVDBUNCENSORED"
	JAVDBCENSOREDURI    = "actors?page=%d"
	JAVDBUNCENSOREDURI  = "actors/uncensored?page=%d"
)

定义下载网站地址常量

Variables

This section is empty.

Functions

func CheckDomainPrefix

func CheckDomainPrefix(domain string) string

CheckDomainPrefix 检查域名最后的斜线

func DownPhoto

func DownPhoto(uri, savePath, proxy string) error

DownPhoto 下载图片到本地

func GetDmmIntro

func GetDmmIntro(code, proxy string) string

GetDmmIntro 直接获取dmm的简介

func GetResult

func GetResult(uri, proxy string, cookies []http.Cookie) ([]byte, error)

GetResult 打开远程链接

func GetRoot

func GetRoot(uri, proxy string, cookies []http.Cookie) (*goquery.Document, error)

GetRoot 获取根节点

func IntroFilter

func IntroFilter(intro string) string

IntroFilter 简介内容各种替换

func MD5Verify

func MD5Verify(data []byte, source string) bool

MD5Verify md5验证, 避免无头像情况

func MakeRequest

func MakeRequest(method, uri, proxy string, body io.Reader, header map[string]string, cookies []http.Cookie) ([]byte, int, error)

MakeRequest 发起请求

func PhotoConvertJpg

func PhotoConvertJpg(of, nf string) error

PhotoConvertJpg 转换图片为jpg格式

Types

type AVSoxScraper

type AVSoxScraper struct {
	Site  string // 免翻地址
	Proxy string // 代理设置
	// contains filtered or unexported fields
}

AVSoxScraper avsox刮削对象

func (*AVSoxScraper) Fetch

func (s *AVSoxScraper) Fetch(code string) error

Fetch 刮削

func (*AVSoxScraper) GetActors

func (s *AVSoxScraper) GetActors() map[string]string

GetActors 获取演员

func (*AVSoxScraper) GetDirector

func (s *AVSoxScraper) GetDirector() string

GetDirector 获取导演

func (*AVSoxScraper) GetFanart

func (s *AVSoxScraper) GetFanart() string

GetFanart 获取图片

func (*AVSoxScraper) GetIntro

func (s *AVSoxScraper) GetIntro() string

GetIntro 获取简介

func (*AVSoxScraper) GetNumber

func (s *AVSoxScraper) GetNumber() string

GetNumber 获取番号

func (*AVSoxScraper) GetRelease

func (s *AVSoxScraper) GetRelease() string

GetRelease 发行时间

func (*AVSoxScraper) GetRuntime

func (s *AVSoxScraper) GetRuntime() string

GetRuntime 获取时长

func (*AVSoxScraper) GetSerise

func (s *AVSoxScraper) GetSerise() string

GetSerise 获取系列

func (*AVSoxScraper) GetStudio

func (s *AVSoxScraper) GetStudio() string

GetStudio 获取厂商

func (*AVSoxScraper) GetTags

func (s *AVSoxScraper) GetTags() []string

GetTags 获取标签

func (*AVSoxScraper) GetTitle

func (s *AVSoxScraper) GetTitle() string

GetTitle 获取名称

func (*AVSoxScraper) GetURI

func (s *AVSoxScraper) GetURI() string

GetURI 获取页面地址

type Actress

type Actress struct {
	Proxy  string   // 代理配置
	JavBus string   // javbus免翻地址
	JavDB  string   // javdb免翻地址
	Emby   *EmbyAPI // emby api
}

Actress 女优

func (*Actress) Down

func (s *Actress) Down(site string, page int)

Down 头像下载

func (*Actress) Put

func (s *Actress) Put()

Put 本地图片入库

func (*Actress) Remote

func (s *Actress) Remote(site string, page int)

Remote 远程入库

type CaribScraper

type CaribScraper struct {
	Proxy string // 代理配置
	// contains filtered or unexported fields
}

CaribScraper 加勒比刮削对象

func (*CaribScraper) Fetch

func (s *CaribScraper) Fetch(code string) error

Fetch 刮削

func (*CaribScraper) GetActors

func (s *CaribScraper) GetActors() map[string]string

GetActors 获取演员

func (*CaribScraper) GetDirector

func (s *CaribScraper) GetDirector() string

GetDirector 获取导演

func (*CaribScraper) GetFanart

func (s *CaribScraper) GetFanart() string

GetFanart 获取图片

func (*CaribScraper) GetIntro

func (s *CaribScraper) GetIntro() string

GetIntro 获取简介

func (*CaribScraper) GetNumber

func (s *CaribScraper) GetNumber() string

GetNumber 获取番号

func (*CaribScraper) GetRelease

func (s *CaribScraper) GetRelease() string

GetRelease 发行时间

func (*CaribScraper) GetRuntime

func (s *CaribScraper) GetRuntime() string

GetRuntime 获取时长

func (*CaribScraper) GetSerise

func (s *CaribScraper) GetSerise() string

GetSerise 获取系列

func (*CaribScraper) GetStudio

func (s *CaribScraper) GetStudio() string

GetStudio 获取厂商

func (*CaribScraper) GetTags

func (s *CaribScraper) GetTags() []string

GetTags 获取标签

func (*CaribScraper) GetTitle

func (s *CaribScraper) GetTitle() string

GetTitle 获取名称

func (*CaribScraper) GetURI

func (s *CaribScraper) GetURI() string

GetURI 获取页面地址

type DMMScraper

type DMMScraper struct {
	Proxy string // 代理配置
	// contains filtered or unexported fields
}

DMMScraper dmm刮削对象

func (*DMMScraper) Fetch

func (s *DMMScraper) Fetch(code string) error

Fetch 刮削

func (*DMMScraper) GetActors

func (s *DMMScraper) GetActors() map[string]string

GetActors 获取演员

func (*DMMScraper) GetDirector

func (s *DMMScraper) GetDirector() string

GetDirector 获取导演

func (*DMMScraper) GetFanart

func (s *DMMScraper) GetFanart() string

GetFanart 获取图片

func (*DMMScraper) GetIntro

func (s *DMMScraper) GetIntro() string

GetIntro 获取简介

func (*DMMScraper) GetNumber

func (s *DMMScraper) GetNumber() string

GetNumber 获取番号

func (*DMMScraper) GetRelease

func (s *DMMScraper) GetRelease() string

GetRelease 发行时间

func (*DMMScraper) GetRuntime

func (s *DMMScraper) GetRuntime() string

GetRuntime 获取时长

func (*DMMScraper) GetSerise

func (s *DMMScraper) GetSerise() string

GetSerise 获取系列

func (*DMMScraper) GetStudio

func (s *DMMScraper) GetStudio() string

GetStudio 获取厂商

func (*DMMScraper) GetTags

func (s *DMMScraper) GetTags() []string

GetTags 获取标签

func (*DMMScraper) GetTitle

func (s *DMMScraper) GetTitle() string

GetTitle 获取名称

func (*DMMScraper) GetURI

func (s *DMMScraper) GetURI() string

GetURI 获取页面地址

type EmbyAPI

type EmbyAPI struct {
	// contains filtered or unexported fields
}

EmbyAPI Emby api对象

func NewEmby

func NewEmby(hostURL, apiKey string) *EmbyAPI

NewEmby 初始化Emby

func (*EmbyAPI) Actor

func (emby *EmbyAPI) Actor(name, face string, upload bool) error

Actor 入库图片

type FC2Scraper

type FC2Scraper struct {
	Proxy string // 代理设置
	// contains filtered or unexported fields
}

FC2Scraper fc2刮削对象

func (*FC2Scraper) Fetch

func (s *FC2Scraper) Fetch(code string) error

Fetch 刮削

func (*FC2Scraper) GetActors

func (s *FC2Scraper) GetActors() map[string]string

GetActors 获取演员

func (*FC2Scraper) GetDirector

func (s *FC2Scraper) GetDirector() string

GetDirector 获取导演

func (*FC2Scraper) GetFanart

func (s *FC2Scraper) GetFanart() string

GetFanart 获取图片

func (*FC2Scraper) GetIntro

func (s *FC2Scraper) GetIntro() string

GetIntro 获取简介

func (*FC2Scraper) GetNumber

func (s *FC2Scraper) GetNumber() string

GetNumber 获取番号

func (*FC2Scraper) GetRelease

func (s *FC2Scraper) GetRelease() string

GetRelease 发行时间

func (*FC2Scraper) GetRuntime

func (s *FC2Scraper) GetRuntime() string

GetRuntime 获取时长

func (*FC2Scraper) GetSerise

func (s *FC2Scraper) GetSerise() string

GetSerise 获取系列

func (*FC2Scraper) GetStudio

func (s *FC2Scraper) GetStudio() string

GetStudio 获取厂商

func (*FC2Scraper) GetTags

func (s *FC2Scraper) GetTags() []string

GetTags 获取标签

func (*FC2Scraper) GetTitle

func (s *FC2Scraper) GetTitle() string

GetTitle 获取名称

func (*FC2Scraper) GetURI

func (s *FC2Scraper) GetURI() string

GetURI 获取页面地址

type HeydougaScraper

type HeydougaScraper struct {
	Proxy string // 代理配置
	// contains filtered or unexported fields
}

HeydougaScraper heydouga刮削对象

func (*HeydougaScraper) Fetch

func (s *HeydougaScraper) Fetch(code string) error

Fetch 刮削

func (*HeydougaScraper) GetActors

func (s *HeydougaScraper) GetActors() map[string]string

GetActors 获取演员

func (*HeydougaScraper) GetDirector

func (s *HeydougaScraper) GetDirector() string

GetDirector 获取导演

func (*HeydougaScraper) GetFanart

func (s *HeydougaScraper) GetFanart() string

GetFanart 获取图片

func (*HeydougaScraper) GetIntro

func (s *HeydougaScraper) GetIntro() string

GetIntro 获取简介

func (*HeydougaScraper) GetNumber

func (s *HeydougaScraper) GetNumber() string

GetNumber 获取番号

func (*HeydougaScraper) GetRelease

func (s *HeydougaScraper) GetRelease() string

GetRelease 发行时间

func (*HeydougaScraper) GetRuntime

func (s *HeydougaScraper) GetRuntime() string

GetRuntime 获取时长

func (*HeydougaScraper) GetSerise

func (s *HeydougaScraper) GetSerise() string

GetSerise 获取系列

func (*HeydougaScraper) GetStudio

func (s *HeydougaScraper) GetStudio() string

GetStudio 获取厂商

func (*HeydougaScraper) GetTags

func (s *HeydougaScraper) GetTags() []string

GetTags 获取标签

func (*HeydougaScraper) GetTitle

func (s *HeydougaScraper) GetTitle() string

GetTitle 获取名称

func (*HeydougaScraper) GetURI

func (s *HeydougaScraper) GetURI() string

GetURI 获取页面地址

type HeyzoScraper

type HeyzoScraper struct {
	Proxy string // 代理配置
	// contains filtered or unexported fields
}

HeyzoScraper heyzo刮削对象

func (*HeyzoScraper) Fetch

func (s *HeyzoScraper) Fetch(code string) error

Fetch 刮削

func (*HeyzoScraper) GetActors

func (s *HeyzoScraper) GetActors() map[string]string

GetActors 获取演员

func (*HeyzoScraper) GetDirector

func (s *HeyzoScraper) GetDirector() string

GetDirector 获取导演

func (*HeyzoScraper) GetFanart

func (s *HeyzoScraper) GetFanart() string

GetFanart 获取图片

func (*HeyzoScraper) GetIntro

func (s *HeyzoScraper) GetIntro() string

GetIntro 获取简介

func (*HeyzoScraper) GetNumber

func (s *HeyzoScraper) GetNumber() string

GetNumber 获取番号

func (*HeyzoScraper) GetRelease

func (s *HeyzoScraper) GetRelease() string

GetRelease 发行时间

func (*HeyzoScraper) GetRuntime

func (s *HeyzoScraper) GetRuntime() string

GetRuntime 获取时长

func (*HeyzoScraper) GetSerise

func (s *HeyzoScraper) GetSerise() string

GetSerise 获取系列

func (*HeyzoScraper) GetStudio

func (s *HeyzoScraper) GetStudio() string

GetStudio 获取厂商

func (*HeyzoScraper) GetTags

func (s *HeyzoScraper) GetTags() []string

GetTags 获取标签

func (*HeyzoScraper) GetTitle

func (s *HeyzoScraper) GetTitle() string

GetTitle 获取名称

func (*HeyzoScraper) GetURI

func (s *HeyzoScraper) GetURI() string

GetURI 获取页面地址

type JavBusScraper

type JavBusScraper struct {
	Site  string // 免翻地址
	Proxy string // 代理配置
	// contains filtered or unexported fields
}

JavBusScraper javbus刮削对象

func (*JavBusScraper) Fetch

func (s *JavBusScraper) Fetch(code string) error

Fetch 刮削

func (*JavBusScraper) GetActors

func (s *JavBusScraper) GetActors() map[string]string

GetActors 获取演员

func (*JavBusScraper) GetDirector

func (s *JavBusScraper) GetDirector() string

GetDirector 获取导演

func (*JavBusScraper) GetFanart

func (s *JavBusScraper) GetFanart() string

GetFanart 获取图片

func (*JavBusScraper) GetIntro

func (s *JavBusScraper) GetIntro() string

GetIntro 获取简介

func (*JavBusScraper) GetNumber

func (s *JavBusScraper) GetNumber() string

GetNumber 获取番号

func (*JavBusScraper) GetRelease

func (s *JavBusScraper) GetRelease() string

GetRelease 发行时间

func (*JavBusScraper) GetRuntime

func (s *JavBusScraper) GetRuntime() string

GetRuntime 获取时长

func (*JavBusScraper) GetSerise

func (s *JavBusScraper) GetSerise() string

GetSerise 获取系列

func (*JavBusScraper) GetStudio

func (s *JavBusScraper) GetStudio() string

GetStudio 获取厂商

func (*JavBusScraper) GetTags

func (s *JavBusScraper) GetTags() []string

GetTags 获取标签

func (*JavBusScraper) GetTitle

func (s *JavBusScraper) GetTitle() string

GetTitle 获取名称

func (*JavBusScraper) GetURI

func (s *JavBusScraper) GetURI() string

GetURI 获取页面地址

type JavDBScraper

type JavDBScraper struct {
	Site  string // 免翻地址
	Proxy string // 代理配置
	// contains filtered or unexported fields
}

JavDBScraper javdb刮削对象

func (*JavDBScraper) Fetch

func (s *JavDBScraper) Fetch(code string) error

Fetch 刮削

func (*JavDBScraper) GetActors

func (s *JavDBScraper) GetActors() map[string]string

GetActors 获取演员

func (*JavDBScraper) GetDirector

func (s *JavDBScraper) GetDirector() string

GetDirector 获取导演

func (*JavDBScraper) GetFanart

func (s *JavDBScraper) GetFanart() string

GetFanart 获取图片

func (*JavDBScraper) GetIntro

func (s *JavDBScraper) GetIntro() string

GetIntro 获取简介

func (*JavDBScraper) GetNumber

func (s *JavDBScraper) GetNumber() string

GetNumber 获取番号

func (*JavDBScraper) GetRelease

func (s *JavDBScraper) GetRelease() string

GetRelease 发行时间

func (*JavDBScraper) GetRuntime

func (s *JavDBScraper) GetRuntime() string

GetRuntime 获取时长

func (*JavDBScraper) GetSerise

func (s *JavDBScraper) GetSerise() string

GetSerise 获取系列

func (*JavDBScraper) GetStudio

func (s *JavDBScraper) GetStudio() string

GetStudio 获取厂商

func (*JavDBScraper) GetTags

func (s *JavDBScraper) GetTags() []string

GetTags 获取标签

func (*JavDBScraper) GetTitle

func (s *JavDBScraper) GetTitle() string

GetTitle 获取名称

func (*JavDBScraper) GetURI

func (s *JavDBScraper) GetURI() string

GetURI 获取页面地址

type Scraper

type Scraper interface {
	// 刮削
	Fetch(code string) error
	// 获取页面地址
	GetURI() string
	// 获取番号
	GetNumber() string

	// 获取名称
	GetTitle() string
	// 获取简介
	GetIntro() string
	// 获取导演
	GetDirector() string
	// 发行时间
	GetRelease() string
	// 获取时长
	GetRuntime() string
	// 获取厂商
	GetStudio() string
	// 获取系列
	GetSerise() string
	// 获取标签
	GetTags() []string
	// 获取图片
	GetFanart() string
	// 获取演员
	GetActors() map[string]string
}

Scraper 刮削器接口

type SiroScraper

type SiroScraper struct {
	Proxy string // 代理配置
	// contains filtered or unexported fields
}

SiroScraper siro对象

func (*SiroScraper) Fetch

func (s *SiroScraper) Fetch(code string) error

Fetch 刮削

func (*SiroScraper) GetActors

func (s *SiroScraper) GetActors() map[string]string

GetActors 获取演员

func (*SiroScraper) GetDirector

func (s *SiroScraper) GetDirector() string

GetDirector 获取导演

func (*SiroScraper) GetFanart

func (s *SiroScraper) GetFanart() string

GetFanart 获取图片

func (*SiroScraper) GetIntro

func (s *SiroScraper) GetIntro() string

GetIntro 获取简介

func (*SiroScraper) GetNumber

func (s *SiroScraper) GetNumber() string

GetNumber 获取番号

func (*SiroScraper) GetRelease

func (s *SiroScraper) GetRelease() string

GetRelease 发行时间

func (*SiroScraper) GetRuntime

func (s *SiroScraper) GetRuntime() string

GetRuntime 获取时长

func (*SiroScraper) GetSerise

func (s *SiroScraper) GetSerise() string

GetSerise 获取系列

func (*SiroScraper) GetStudio

func (s *SiroScraper) GetStudio() string

GetStudio 获取厂商

func (*SiroScraper) GetTags

func (s *SiroScraper) GetTags() []string

GetTags 获取标签

func (*SiroScraper) GetTitle

func (s *SiroScraper) GetTitle() string

GetTitle 获取名称

func (*SiroScraper) GetURI

func (s *SiroScraper) GetURI() string

GetURI 获取页面地址

type TokyoHotScraper

type TokyoHotScraper struct {
	Proxy string // 代理配置
	// contains filtered or unexported fields
}

TokyoHotScraper tokyohot对象

func (*TokyoHotScraper) Fetch

func (s *TokyoHotScraper) Fetch(code string) error

Fetch 刮削

func (*TokyoHotScraper) GetActors

func (s *TokyoHotScraper) GetActors() map[string]string

GetActors 获取演员

func (*TokyoHotScraper) GetDirector

func (s *TokyoHotScraper) GetDirector() string

GetDirector 获取导演

func (*TokyoHotScraper) GetFanart

func (s *TokyoHotScraper) GetFanart() string

GetFanart 获取图片

func (*TokyoHotScraper) GetIntro

func (s *TokyoHotScraper) GetIntro() string

GetIntro 获取简介

func (*TokyoHotScraper) GetNumber

func (s *TokyoHotScraper) GetNumber() string

GetNumber 获取番号

func (*TokyoHotScraper) GetRelease

func (s *TokyoHotScraper) GetRelease() string

GetRelease 发行时间

func (*TokyoHotScraper) GetRuntime

func (s *TokyoHotScraper) GetRuntime() string

GetRuntime 获取时长

func (*TokyoHotScraper) GetSerise

func (s *TokyoHotScraper) GetSerise() string

GetSerise 获取系列

func (*TokyoHotScraper) GetStudio

func (s *TokyoHotScraper) GetStudio() string

GetStudio 获取厂商

func (*TokyoHotScraper) GetTags

func (s *TokyoHotScraper) GetTags() []string

GetTags 获取标签

func (*TokyoHotScraper) GetTitle

func (s *TokyoHotScraper) GetTitle() string

GetTitle 获取名称

func (*TokyoHotScraper) GetURI

func (s *TokyoHotScraper) GetURI() string

GetURI 获取页面地址

type WaitGroup

type WaitGroup struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

WaitGroup 携程对象

func NewWaitGroup

func NewWaitGroup(parallel int) (w *WaitGroup)

NewWaitGroup returns a pointer to a new `WaitGroup` object. parallel 为最大并发数, 0 代表无限制

func (*WaitGroup) AddDelta

func (w *WaitGroup) AddDelta()

AddDelta sync.WaitGroup.Add(1)

func (*WaitGroup) Done

func (w *WaitGroup) Done()

Done sync.WaitGroup.Done()

func (*WaitGroup) Parallel

func (w *WaitGroup) Parallel() int

Parallel 返回当前正在进行的任务数量

func (*WaitGroup) Wait

func (w *WaitGroup) Wait()

Wait 参照 sync.WaitGroup 的 Wait 方法

Jump to

Keyboard shortcuts

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