pornhub_dl

package module
v0.0.0-...-67eeb53 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2020 License: MIT Imports: 9 Imported by: 1

README

pornhub-dl

download pornhub videos. written in go.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrWrongUrl            = errors.New("wrong url")
	ErrHttpGetFailed       = errors.New("get url failed")
	ErrParseHtmlPageFailed = errors.New("parse html page failed")
)

Functions

This section is empty.

Types

type FileInfo

type FileInfo struct {
	Number        int    `json:"number"`
	Extension     string `json:"extension"`  //格式
	Resolution    string `json:"resolution"` //解析度
	VideoEncoding string `json:"videoEncoding"`
	AudioEncoding string `json:"audioEncoding"`
	AudioBitrate  int    `json:"audioBitrate"`
	FPS           int    `json:"fps"`  // FPS are frames per second
	Url           string `json:"url"`  //视频下载地址
	Size          int64  `json:"size"` //视频大小
}

type VideoInfo

type VideoInfo struct {
	ID            string        `json:"id"`            // ID
	Title         string        `json:"title"`         //标题
	Description   string        `json:"description"`   //描述
	DatePublished time.Time     `json:"datePublished"` //发表日期
	Uploader      string        `json:"uploader"`      //上传者
	Duration      time.Duration `json:"duration"`      //时长
	ThumbnailUrl  string
	Files         []*FileInfo
}

func GetVideoInfoByKey

func GetVideoInfoByKey(viewKey string) (video *VideoInfo, err error)

func GetVideoInfoByUrl

func GetVideoInfoByUrl(rawUrl string) (video *VideoInfo, err error)

Jump to

Keyboard shortcuts

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