spider

package
v0.0.0-...-4e3253c Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownLoadFile

func DownLoadFile(filepath string, url string) error

DownLoadFile download mp4 file

func GetURL

func GetURL(url string) []byte

GetURL get html by url

func InitMysqlClient

func InitMysqlClient() (*gorm.DB, error)

InitMysqlClient 测试mysql连接

func InitRedisClient

func InitRedisClient() error

InitRedisClient 初始化并测试redis

func RE

func RE()

Types

type DownLoader

type DownLoader struct {
	io.Reader
	Total, Current int64
}

DownLoader io.reader

func (*DownLoader) Read

func (d *DownLoader) Read(p []byte) (n int, err error)

type MovieUrl

type MovieUrl struct {
	Name    string `gorm:"unique;not null"`
	Url     string `gorm:"not null"`
	CreatAt time.Time
}

func (*MovieUrl) TableName

func (u *MovieUrl) TableName() string

Jump to

Keyboard shortcuts

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