platforms

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IqyAuthCookie   = ""
	IqyDfp          = "a049cca57369584ec09b6d99c8fc03da96c5f68f2cbd09625f04b0ad7c15640026"
	IqyMDeviceID    = "go5e8hbplm0iumdxpsat9upx"
	IqyAgentversion = "10.7.5"
)
View Source
const RepetitionMsg = "检测到当前视频重复下载,因之前设置了过滤重复,直接跳过当前下载。"

RepetitionMsg 视频重复下载时的提示信息

Variables

View Source
var AnnieFile = fmt.Sprintf("%s\\annie.exe", AppBinPath)

AnnieFile 程序annie存放位置

View Source
var AppBinPath = fmt.Sprintf("%s\\bin", AppPath)

AppBinPath 程序bin目录

View Source
var AppDataPath = fmt.Sprintf("%s\\data", AppPath)

AppDataPath 程序data目录

View Source
var AppPath = fmt.Sprintf("%s\\goannie", os.Getenv("APPDATA"))

AppPath 程序app目录

View Source
var Aria2File = fmt.Sprintf("%s\\aria2c.exe", AppBinPath)

Aria2File 程序aria2存放位置

View Source
var Client = http.Client{Timeout: time.Second * 30}

Client 默认Cliend

View Source
var FfmpegFile = fmt.Sprintf("%s\\ffmpeg.exe", AppBinPath)

FfmpegFile 程序ffmpeg存放位置

View Source
var RedisConfFile = fmt.Sprintf("%s\\redis.windows-service.conf", AppBinPath)

RedisConfFile 程序redisconf存放位置

View Source
var RedisFile = fmt.Sprintf("%s\\redis-server.exe", AppBinPath)

RedisFile 程序redis存放位置

View Source
var UserAgentPc = "" /* 131-byte string literal not displayed */

UserAgentPc 电脑端user-agent

View Source
var UserAgentWap = "" /* 157-byte string literal not displayed */

UserAgentWap 手机端端user-agent

Functions

func AddVideoID

func AddVideoID(pt, vid string, conn redis.Conn) error

AddVideoID 存储已下载的视频ID

func AnnieDownload

func AnnieDownload(url, savePath, cookiePath, DefaultCookie string) error

AnnieDownload 使用annie下载

func AnnieDownloadAll

func AnnieDownloadAll(urlList []map[string]string, runType RunType, pt string)

AnnieDownloadAll 使用annie批量下载

func Aria2Download

func Aria2Download(url, savePath, saveFile, cookiePath string, maxConnectionPerServer int) error

Aria2Download 使用Aria2下载

func BliGetBvid

func BliGetBvid(url string) string

BliGetBvid 通过url获取bvid

func BliGetVideoP

func BliGetVideoP(runType RunType, bvid string) error

BliGetVideoP 多p交易

func BliIsP

func BliIsP(bvid string) bool

BliIsP 判断是否需要多P交易

func CreactVideoID

func CreactVideoID(pt string) error

CreactVideoID 创建视频ID

func DyGetDownloadURL

func DyGetDownloadURL(uri, ratio string) (string, error)

DyGetDownloadURL 通过uri获取真实下载地址

func DyGetItemID

func DyGetItemID(url string) (string, error)

DyGetItemID 获取ItemID

func DyGetRealURL

func DyGetRealURL(url string, errorCount int) (string, error)

DyGetRealURL 获取跳转真实地址

func DyGetSecUID

func DyGetSecUID(url string) (string, error)

DyGetSecUID 获取 sec_uid

func GetCmdDataString

func GetCmdDataString(Info string, resData *string) error

GetCmdDataString 控制台输入

func GetRealURL

func GetRealURL(url string) (string, error)

GetRealURL 获取跳转真实地址

func GetTxtContent

func GetTxtContent(path string) string

GetTxtContent 获取txt内容

func GetVideoID

func GetVideoID(pt string) (*[]string, error)

GetVideoID 获取已下载的视频ID

func IqyArchive added in v0.0.21

func IqyArchive(runType RunType) error

IqyArchive 归档 https://www.iqiyi.com/a_19rrht2ok5.html

func IqyDetailBranch added in v0.0.21

func IqyDetailBranch(url string) string

IqyDetailBranch 剧集页有多种 archive 归档 https://www.iqiyi.com/a_19rrht2ok5.html episodes 剧集 https://www.iqiyi.com/a_19rrh9f0tx.html

func IqyEpisodeInfoActionSign

func IqyEpisodeInfoActionSign(qipuIds, timestamp string) string

IqyEpisodeInfoActionSign 生成作者作品详细信息API的Sign

func IqyEpisodes added in v0.0.21

func IqyEpisodes(runType RunType) error

IqyEpisodes 剧集 https://www.iqiyi.com/a_19rrh9f0tx.html

func IqyGetAID added in v0.0.21

func IqyGetAID(url string) string

IqyGetAID 获取aid

func IqyGetEpisodesMaxPage added in v0.0.21

func IqyGetEpisodesMaxPage(aid string) (int, int, error)

IqyGetEpisodesMaxPage 获取剧集页数

func IqyGetFuID

func IqyGetFuID(url string) (string, error)

IqyGetFuID 通过url获取FuID

func IqyGetMaxPage

func IqyGetMaxPage(fuid string) (int, int, error)

IqyGetMaxPage 获取作者列表页数

func IqyGetVID

func IqyGetVID(url string) string

IqyGetVID 通过请求获取vid

func IqyVideosActionSign

func IqyVideosActionSign(fuid, timestamp, page, size string) string

IqyVideosActionSign 生成作者作品列表API的Sign

func IsExist

func IsExist(path string) (bool, error)

IsExist 文件夹或文件是否存在

func IsVideoID

func IsVideoID(pt, vid string, conn redis.Conn) bool

IsVideoID 对比库是否存在视频ID

func MD5

func MD5(str string) string

MD5 生成md5

func MapToParameters

func MapToParameters(parameters [][2]string) string

MapToParameters map转url参数

func NewMapToParameters

func NewMapToParameters(parameters [][2]string, isQuery bool) string

NewMapToParameters map转url参数

func PrintErrInfo

func PrintErrInfo(errInfo string)

PrintErrInfo 打印错误信息

func PrintInfo

func PrintInfo(info string)

PrintInfo 打印日常信息

func PrintInfof

func PrintInfof(info string)

PrintInfof 打印日常信息

func PrintVideoIDCount

func PrintVideoIDCount(conn redis.Conn)

PrintVideoIDCount 打印过滤库个数

func RequestGet

func RequestGet(url string, headers map[string]string) (*http.Response, error)

RequestGet 通用get请求

func RequestGetHTML

func RequestGetHTML(url string, headers map[string]string) ([]byte, error)

RequestGetHTML 请求获取HTML

func RequestGetJSON

func RequestGetJSON(url string, headers map[string]string, v interface{}) error

RequestGetJSON 请求获取json

func RunBliOne

func RunBliOne(runType RunType, arg map[string]string) error

RunBliOne 单视频

func RunBliUserList

func RunBliUserList(runType RunType, arg map[string]string) error

RunBliUserList 作者列表

func RunDyOne

func RunDyOne(runType RunType, arg map[string]string) error

RunDyOne 单视频

func RunDyShortURL

func RunDyShortURL(runType RunType, arg map[string]string) error

RunDyShortURL 短链接

func RunDyUserList

func RunDyUserList(runType RunType, arg map[string]string) error

RunDyUserList 作者视频

func RunHgUserList

func RunHgUserList(runType RunType, arg map[string]string) error

RunHgUserList 作者视频 https://huoguo.qq.com/m/person.html?userid=18590596

func RunHkOne

func RunHkOne(runType RunType, arg map[string]string) error

RunHkOne 单视频

func RunHkUserList

func RunHkUserList(runType RunType, arg map[string]string) error

RunHkUserList 作者列表

func RunIqyDetail

func RunIqyDetail(runType RunType, arg map[string]string) error

RunIqyDetail 爱奇艺归档页:https://www.iqiyi.com/a_19rrht2ok5.html

func RunIqyOne

func RunIqyOne(runType RunType, arg map[string]string) error

RunIqyOne 单视频

func RunIqyUserList

func RunIqyUserList(runType RunType, arg map[string]string) error

RunIqyUserList 作者视频

func RunLookHgUserList

func RunLookHgUserList(runType RunType, arg map[string]string) error

RunLookHgUserList 看作者作品列表 look https://huoguo.qq.com/m/person.html?userid=18590596

func RunLookTxUserList

func RunLookTxUserList(runType RunType, arg map[string]string) error

RunLookTxUserList 看作者作品列表 look https://v.qq.com/s/videoplus/1790091432

func RunLookXgUserList

func RunLookXgUserList(runType RunType, arg map[string]string) error

RunLookXgUserList 看作者作品列表 look https://www.ixigua.com/home/85383446500/video/

func RunTxDetail

func RunTxDetail(runType RunType, arg map[string]string) error

RunTxDetail 腾讯归档页:https://v.qq.com/detail/5/52852.html

func RunTxDetailTow added in v0.0.23

func RunTxDetailTow(runType RunType, arg map[string]string) error

RunTxDetailTow 腾讯归档页 改版后

func RunTxOne

func RunTxOne(runType RunType, arg map[string]string) error

RunTxOne 单视频

func RunTxUserList

func RunTxUserList(runType RunType, arg map[string]string) error

RunTxUserList 腾讯作者页:https://v.qq.com/s/videoplus/1790091432#uin=42ffd591994e622dd2e414ecc3137397

func RunXgOne

func RunXgOne(runType RunType, arg map[string]string) error

RunXgOne 西瓜单视频 https://www.ixigua.com/6832194590221533707

func RunXgUserList

func RunXgUserList(runType RunType, arg map[string]string) error

RunXgUserList TA的视频 https://www.ixigua.com/home/85383446500/video/

func RunYkOne

func RunYkOne(runType RunType, arg map[string]string) error

RunYkOne 单视频

func RunYkUserlist

func RunYkUserlist(runType RunType, arg map[string]string) error

RunYkUserlist 作者

func SetGoannieEnv

func SetGoannieEnv() error

SetGoannieEnv 设置环境变量

func TOLeadRedis

func TOLeadRedis(conn redis.Conn)

TOLeadRedis 兼容之前的文件存储方式,直接导入到 redis 库

func TxDetailOne added in v0.0.23

func TxDetailOne(runType RunType) error

TxDetailOne 腾讯剧集页第一种 https://v.qq.com/detail/8/87895.html

func TxDetailTow added in v0.0.23

func TxDetailTow(runType RunType) error

TxDetailTow 腾讯剧集页第二种 https://v.qq.com/detail/m/m441e3rjq9kwpsc.html

func TxGetDetailTowURLS added in v0.0.23

func TxGetDetailTowURLS(url string) ([]string, error)

TxGetDetailTowURLS 获取剧集链接

func TxGetVID

func TxGetVID(url string) string

TxGetVID 通过url获取vid

func YkGetMaxPage

func YkGetMaxPage(uid string) (int, error)

YkGetMaxPage 获取页数

func YkGetUID

func YkGetUID(url string) (string, error)

YkGetUID 获取UID

func YkGetUserVideolist

func YkGetUserVideolist(uid, page string) ([]map[string]string, error)

YkGetUserVideolist 获取作者视频

func YkGetUserVideolistHTML

func YkGetUserVideolistHTML(uid, page string) ([]byte, error)

YkGetUserVideolistHTML 请求作者列表返回HTML

func YkGetVID

func YkGetVID(url string) (string, error)

YkGetVID 获取VID

Types

type BliUserVideoList

type BliUserVideoList struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	TTL     int    `json:"ttl"`
	Data    struct {
		List struct {
			Tlist struct {
				Num3 struct {
					Tid   int    `json:"tid"`
					Count int    `json:"count"`
					Name  string `json:"name"`
				} `json:"3"`
				Num4 struct {
					Tid   int    `json:"tid"`
					Count int    `json:"count"`
					Name  string `json:"name"`
				} `json:"4"`
				Num160 struct {
					Tid   int    `json:"tid"`
					Count int    `json:"count"`
					Name  string `json:"name"`
				} `json:"160"`
			} `json:"tlist"`
			Vlist []struct {
				Comment      int    `json:"comment"`
				Typeid       int    `json:"typeid"`
				Play         int    `json:"play"`
				Pic          string `json:"pic"`
				Subtitle     string `json:"subtitle"`
				Description  string `json:"description"`
				Copyright    string `json:"copyright"`
				Title        string `json:"title"`
				Review       int    `json:"review"`
				Author       string `json:"author"`
				Mid          int    `json:"mid"`
				Created      int    `json:"created"`
				Length       string `json:"length"`
				VideoReview  int    `json:"video_review"`
				Aid          int    `json:"aid"`
				Bvid         string `json:"bvid"`
				HideClick    bool   `json:"hide_click"`
				IsPay        int    `json:"is_pay"`
				IsUnionVideo int    `json:"is_union_video"`
			} `json:"vlist"`
		} `json:"list"`
		Page struct {
			Count int `json:"count"`
			Pn    int `json:"pn"`
			Ps    int `json:"ps"`
		} `json:"page"`
	} `json:"data"`
}

BliUserVideoList 哔哩哔哩视频作者视频列表API

type BliVideoP

type BliVideoP struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	Data    []struct {
		Page int    `json:"page"`
		Part string `json:"part"`
	} `json:"data"`
}

BliVideoP 多P api

type DouyinUserInfo

type DouyinUserInfo struct {
	StatusCode int `json:"status_code"`
	UserInfo   struct {
		Nickname        string `json:"nickname"`
		AwemeCount      int    `json:"aweme_count"`
		FavoritingCount int    `json:"favoriting_count"`
		FollowerCount   int    `json:"follower_count"`
		UID             string `json:"uid"`
	} `json:"user_info"`
}

DouyinUserInfo 抖音作者信息

func DyGetUserInfo

func DyGetUserInfo(secUserID string) (*DouyinUserInfo, error)

DyGetUserInfo 获取作者信息

type DouyinVideoInfo

type DouyinVideoInfo struct {
	Title    string
	Widht    int
	Height   int
	Duration int
	Ratio    string
	URI      string
	AwemeID  string
}

DouyinVideoInfo 抖音视频信息

func DyGetOne

func DyGetOne(url string) (*DouyinVideoInfo, error)

DyGetOne 获取单视频信息

type DouyinVideoItem

type DouyinVideoItem struct {
	StatusCode int `json:"status_code"`
	ItemList   []struct {
		Desc    string `json:"desc"`
		AwemeID string `json:"aweme_id"`
		Video   struct {
			Widht    int    `json:"width"`
			Height   int    `json:"height"`
			Ratio    string `json:"ratio"`
			Duration int    `json:"duration"`
			URI      string `json:"vid"`
		} `json:"video"`
	} `json:"item_list"`
}

DouyinVideoItem 视频信息接口

func DyGetIteminfo

func DyGetIteminfo(itemID string) (*DouyinVideoItem, error)

DyGetIteminfo 获取抖音视频信息

type DouyinVideoList

type DouyinVideoList struct {
	AwemeList []struct {
		AwemeID   string `json:"aweme_id"`
		Desc      string `json:"desc"`
		ShareInfo struct {
			ShareTitle string `json:"share_title"`
		} `json:"share_info"`
		ShareURL string `json:"share_url"`
		Video    struct {
			DownloadAddr struct {
				URI      string   `json:"uri"`
				DataSize int      `json:"data_size"`
				Height   int      `json:"height"`
				Width    int      `json:"width"`
				URLList  []string `json:"url_list"`
			} `json:"download_addr"`
		} `json:"video"`
	} `json:"aweme_list"`
	HasMore    int `json:"has_more"`
	MaxCursor  int `json:"max_cursor"`
	MinCursor  int `json:"min_cursor"`
	StatusCode int `json:"status_code"`
}

DouyinVideoList 抖音视频作者列表API

func DyGetUserlistAPI

func DyGetUserlistAPI(secUserID string, maxCursor, errCount int) (*DouyinVideoList, error)

DyGetUserlistAPI 请求抖音作者

type DownloadPrint

type DownloadPrint struct {
	Site      string
	Title     string
	Type      string
	Quality   string
	Size      string
	SizeBytes int64
}

DownloadPrint 程序下载时打印结构体

func (*DownloadPrint) FormatSize

func (d *DownloadPrint) FormatSize()

FormatSize 格式化字节

func (*DownloadPrint) Init

func (d *DownloadPrint) Init(url string)

Init 初始化

func (DownloadPrint) Print

func (d DownloadPrint) Print()

Print 打印

func (*DownloadPrint) SetSize

func (d *DownloadPrint) SetSize(url string)

SetSize 获取文件大小

type HaokanUserVideoList

type HaokanUserVideoList struct {
	Errno int    `json:"errno"`
	Error string `json:"error"`
	Data  struct {
		RequestParam []interface{} `json:"requestParam"`
		Response     struct {
			ResponseCount int `json:"response_count"`
			HasMore       int `json:"has_more"`
			Results       []struct {
				TplName string `json:"tplName"`
				Type    string `json:"type"`
				Content struct {
					Vid              string        `json:"vid"`
					SortTime         int           `json:"sort_time"`
					PublishTime      string        `json:"publish_time"`
					Title            string        `json:"title"`
					CoverSrc         string        `json:"cover_src"`
					CoverSrcPc       string        `json:"cover_src_pc"`
					VideoSrc         string        `json:"video_src"`
					Duration         string        `json:"duration"`
					Authorid         string        `json:"authorid"`
					Poster           string        `json:"poster"`
					Thumbnails       string        `json:"thumbnails"`
					URL              string        `json:"url"`
					LocURL           string        `json:"loc_url"`
					FeedID           string        `json:"feed_id"`
					Author           string        `json:"author"`
					AuthorIcon       string        `json:"author_icon"`
					LikeNum          int           `json:"like_num"`
					RecType          int           `json:"rec_type"`
					ReadNum          int           `json:"read_num"`
					Playcnt          int           `json:"playcnt"`
					PlaycntText      string        `json:"playcntText"`
					HaokanSourceFrom string        `json:"haokan_source_from"`
					Ext              []interface{} `json:"ext"`
					VideoList        struct {
						Sd string `json:"sd"`
						Hd string `json:"hd"`
						Sc string `json:"sc"`
					} `json:"video_list"`
					Size struct {
						Sd int `json:"sd"`
						Hd int `json:"hd"`
						Sc int `json:"sc"`
					} `json:"size"`
					VideoType         string      `json:"videoType"`
					Ctk               string      `json:"ctk"`
					Pvid              string      `json:"pvid"`
					VideoShortURL     string      `json:"video_short_url"`
					AuthorPassportID  string      `json:"author_passport_id"`
					Dtime             int64       `json:"dtime"`
					VoteDisableCtrl   string      `json:"vote_disable_ctrl"`
					SensitiveFlags    interface{} `json:"sensitive_flags"`
					DisplaytypeExinfo struct {
						GoodsType []interface{} `json:"goods_type"`
					} `json:"displaytype_exinfo"`
					IsShowFeature bool   `json:"is_show_feature"`
					CommentNum    string `json:"commentNum"`
					PraiseNum     int    `json:"praiseNum"`
				} `json:"content"`
			} `json:"results"`
			Ctime string `json:"ctime"`
		} `json:"response"`
	} `json:"data"`
}

HaokanUserVideoList 好看视频作者视频列表API

type HuoguoUserVideoList

type HuoguoUserVideoList struct {
	Data struct {
		ErrCode     int    `json:"errCode"`
		PageContext string `json:"pageContext"`
		Collections []struct {
			TvBoard struct {
				Poster struct {
					FirstLine string `json:"firstLine"`
					ImageURL  string `json:"imageUrl"`
					Action    struct {
						URL          string `json:"url"`
						CacheType    int    `json:"cacheType"`
						PreReadType  int    `json:"preReadType"`
						ReportParams string `json:"reportParams"`
					} `json:"action"`
					PlayCountL   int     `json:"playCountL"`
					DisplayRatio float64 `json:"displayRatio"`
					FaceArea     struct {
						XPoint float64 `json:"xPoint"`
						YPoint float64 `json:"yPoint"`
					} `json:"faceArea"`
					ImageURLRatio float64 `json:"imageUrlRatio"`
					GifURLRatio   float64 `json:"gifUrlRatio"`
				} `json:"poster"`
				VideoData struct {
					Vid       string `json:"vid"`
					PayStatus int    `json:"payStatus"`
					Poster    struct {
						Action struct {
							CacheType   int `json:"cacheType"`
							PreReadType int `json:"preReadType"`
						} `json:"action"`
						PlayCountL   int     `json:"playCountL"`
						DisplayRatio float64 `json:"displayRatio"`
						FaceArea     struct {
							XPoint float64 `json:"xPoint"`
							YPoint float64 `json:"yPoint"`
						} `json:"faceArea"`
						ImageURLRatio float64 `json:"imageUrlRatio"`
						GifURLRatio   float64 `json:"gifUrlRatio"`
					} `json:"poster"`
					SkipStart               int    `json:"skipStart"`
					Title                   string `json:"title"`
					IsNoStroeWatchedHistory bool   `json:"isNoStroeWatchedHistory"`
					WatchRecordPoster       struct {
						Action struct {
							CacheType   int `json:"cacheType"`
							PreReadType int `json:"preReadType"`
						} `json:"action"`
						PlayCountL   int     `json:"playCountL"`
						DisplayRatio float64 `json:"displayRatio"`
						FaceArea     struct {
							XPoint float64 `json:"xPoint"`
							YPoint float64 `json:"yPoint"`
						} `json:"faceArea"`
						ImageURLRatio float64 `json:"imageUrlRatio"`
						GifURLRatio   float64 `json:"gifUrlRatio"`
					} `json:"watchRecordPoster"`
					ShareItem struct {
						ShareStyle int `json:"shareStyle"`
						ShareCount int `json:"shareCount"`
					} `json:"shareItem"`
					StreamRatio float64 `json:"streamRatio"`
				} `json:"videoData"`
				IsAutoPlayer   bool `json:"isAutoPlayer"`
				IsLoopPlayBack bool `json:"isLoopPlayBack"`
				AttentInfo     struct {
					AttentKey   string `json:"attentKey"`
					AttentState int    `json:"attentState"`
					Count       int    `json:"count"`
				} `json:"attentInfo"`
				ShareItem struct {
					ShareURL      string `json:"shareUrl"`
					ShareTitle    string `json:"shareTitle"`
					ShareSubtitle string `json:"shareSubtitle"`
					ShareImgURL   string `json:"shareImgUrl"`
					ShareStyle    int    `json:"shareStyle"`
					ShareCount    int    `json:"shareCount"`
				} `json:"shareItem"`
				TimeStamp int `json:"timeStamp"`
				User      struct {
					UserInfo struct {
						Account struct {
							Type int    `json:"type"`
							ID   string `json:"id"`
						} `json:"account"`
						UserName     string `json:"userName"`
						FaceImageURL string `json:"faceImageUrl"`
						DetailInfo   []struct {
							ItemKey   string `json:"itemKey"`
							ItemValue string `json:"itemValue"`
							ItemID    string `json:"itemId"`
						} `json:"detailInfo"`
						LegalizeInfo struct {
							Type int `json:"type"`
						} `json:"legalizeInfo"`
					} `json:"userInfo"`
					RelationItem struct {
						RelationKey string `json:"relationKey"`
						FromMe      int    `json:"fromMe"`
						ToMe        int    `json:"toMe"`
					} `json:"relationItem"`
					Action struct {
						URL         string `json:"url"`
						CacheType   int    `json:"cacheType"`
						PreReadType int    `json:"preReadType"`
					} `json:"action"`
					UserShareItem struct {
						ShareStyle int `json:"shareStyle"`
						ShareCount int `json:"shareCount"`
					} `json:"userShareItem"`
					PickInfo struct {
						Count      int `json:"count"`
						Trend      int `json:"trend"`
						PickScence struct {
							Scence int `json:"scence"`
						} `json:"pickScence"`
						Rank          int `json:"rank"`
						AllowPick     int `json:"allowPick"`
						ActionBarInfo struct {
							Action struct {
								CacheType   int `json:"cacheType"`
								PreReadType int `json:"preReadType"`
							} `json:"action"`
						} `json:"actionBarInfo"`
						TrendCount int `json:"trendCount"`
					} `json:"pickInfo"`
					OwnPickInfo struct {
						PickScence struct {
							Scence int `json:"scence"`
						} `json:"pickScence"`
						LeftPicks int `json:"leftPicks"`
					} `json:"ownPickInfo"`
				} `json:"user"`
				CommentInfo struct {
					Action struct {
						URL         string `json:"url"`
						CacheType   int    `json:"cacheType"`
						PreReadType int    `json:"preReadType"`
					} `json:"action"`
					CommentCount  int    `json:"commentCount"`
					HotCommentKey string `json:"hotCommentKey"`
				} `json:"commentInfo"`
				AuditStatus   int `json:"auditStatus"`
				PrivacyStatus int `json:"privacyStatus"`
				Duration      int `json:"duration"`
			} `json:"tvBoard"`
		} `json:"collections"`
		HasNextPage bool `json:"hasNextPage"`
		Count       int  `json:"count"`
	} `json:"data"`
	Ret int    `json:"ret"`
	Msg string `json:"msg"`
}

HuoguoUserVideoList 火锅视频作者视频列表API

type IqiyEpisodeInfoAction

type IqiyEpisodeInfoAction struct {
	Code string `json:"code"`
	Data map[string]struct {
		QipuID   int    `json:qipuId`
		Title    string `json:title`
		PageUrl  string `json:pageUrl`
		Nickname string `json:nickname`
		VID      string `json:vid`
	} `json:"data"`
	Msg interface{} `json:"msg"`
}

IqiyEpisodeInfoAction 爱奇艺作品详情api

func IqyEpisodeInfoAction

func IqyEpisodeInfoAction(fuid, qipuIds string) (*IqiyEpisodeInfoAction, error)

IqyEpisodeInfoAction 请求作品详情API

func IqyGetUserVideos

func IqyGetUserVideos(fuid string, page string) (*IqiyEpisodeInfoAction, error)

IqyGetUserVideos 获取作者作品

type IqiyGetVideosAction

type IqiyGetVideosAction struct {
	Code string `json:"code"`
	Data struct {
		HasMore  int `json:"hasMore"`
		TotalNum int `json:"totalNum"`
		Sort     struct {
			ReprentativeWork interface{} `json:"reprentativeWork"`
			Flows            []struct {
				QipuID int64 `json:"qipuId"`
			} `json:"flows"`
		} `json:"sort"`
	} `json:"data"`
	Msg interface{} `json:"msg"`
}

IqiyGetVideosAction 爱奇艺作品列表api

func IqyVideosAction

func IqyVideosAction(fuid, page, size string) (*IqiyGetVideosAction, error)

IqyVideosAction 请求作品列表API

type IqiyPaoPaoInfoApi added in v0.0.21

type IqiyPaoPaoInfoApi struct {
	Code string `json:"code"`
	Data struct {
		Epsodelist []struct {
			TvID     int    `json:tvId`
			VID      string `json:vid`
			Name     string `json:name`
			SubTitle string `json:subtitle`
			PlayURL  string `json:playUrl`
		} `json:epsodelist`
		Total int `json:total`
	} `json:"data"`
}

IqiyPaoPaoInfoApi 爱奇艺剧集信息api

func IqyAvlistInfo added in v0.0.21

func IqyAvlistInfo(aid, page string) (*IqiyPaoPaoInfoApi, error)

IqyAvlistInfo 剧集

type IqiyiPlayPageInfo

type IqiyiPlayPageInfo struct {
	AlbumId string
	Cid     string
}

IqiyiPlayPageInfo 爱奇艺归档html数据

func DetailGetPlayPageInfo

func DetailGetPlayPageInfo(url, cookiePath string) (*IqiyiPlayPageInfo, error)

DetailGetPlayPageInfo 爱奇艺归档请求HTML

type IqiyiSvlistinfo

type IqiyiSvlistinfo struct {
	Code string `json:"code"`
	Data map[string][]struct {
		TvID            int64  `json:"tvId"`
		Description     string `json:"description"`
		Subtitle        string `json:"subtitle"`
		Vid             string `json:"vid"`
		Name            string `json:"name"`
		PlayURL         string `json:"playUrl"`
		IssueTime       int64  `json:"issueTime"`
		ContentType     int    `json:"contentType"`
		PayMark         int    `json:"payMark"`
		PayMarkURL      string `json:"payMarkUrl"`
		ImageURL        string `json:"imageUrl"`
		Duration        string `json:"duration"`
		AlbumImageURL   string `json:"albumImageUrl"`
		Period          string `json:"period"`
		Exclusive       bool   `json:"exclusive"`
		Order           int    `json:"order"`
		QiyiProduced    bool   `json:"qiyiProduced"`
		Focus           string `json:"focus"`
		ShortTitle      string `json:"shortTitle"`
		DownloadAllowed bool   `json:"downloadAllowed"`
		Is1080P         int    `json:"is1080p"`
		IP              struct {
			ID         string        `json:"id"`
			Deleted    string        `json:"deleted"`
			Books      []interface{} `json:"books"`
			Games      []interface{} `json:"games"`
			Tickets    []interface{} `json:"tickets"`
			Comicbooks []interface{} `json:"comicbooks"`
		} `json:"ip"`
	} `json:"data"`
}

IqiyiSvlistinfo 爱奇艺归档API

func DetailGetSvlistinfo

func DetailGetSvlistinfo(url, cookiePath string) (*IqiyiSvlistinfo, error)

DetailGetSvlistinfo 爱奇艺归档请求API

type RunType

type RunType struct {
	URL           string
	SavePath      string
	CookieFile    string
	DefaultCookie string
	IsDeWeight    bool
	RedisConn     redis.Conn
}

RunType 程序传递信息的主要结构体

type TengxunPlaysource

type TengxunPlaysource struct {
	PlaylistItem struct {
		AsyncParam    string        `json:"asyncParam"`
		BtnList       []interface{} `json:"btnList"`
		BtnPlayURL    string        `json:"btnPlayUrl"`
		BtnTitle      string        `json:"btnTitle"`
		DisplayType   int           `json:"displayType"`
		FirstResList  []string      `json:"firstResList"`
		IndexList     []string      `json:"indexList"`
		IndexList2    []string      `json:"indexList2"`
		Name          string        `json:"name"`
		NeedAsync     bool          `json:"needAsync"`
		PayType       int           `json:"payType"`
		PlVideoType   int           `json:"pl_video_type"`
		RealName      string        `json:"realName"`
		StrIconURL    string        `json:"strIconUrl"`
		Title         string        `json:"title"`
		TotalEpisode  int           `json:"totalEpisode"`
		VideoPlayList []struct {
			EpisodeNumber string        `json:"episode_number"`
			ID            string        `json:"id"`
			MarkLabelList []interface{} `json:"markLabelList"`
			PayType       int           `json:"payType"`
			Pic           string        `json:"pic"`
			PlayURL       string        `json:"playUrl"`
			ThirdLine     string        `json:"thirdLine"`
			Title         string        `json:"title"`
			Type          string        `json:"type"`
		} `json:"videoPlayList"`
	} `json:"PlaylistItem"`
	Error int    `json:"error"`
	Msg   string `json:"msg"`
}

TengxunPlaysource 腾讯归档API

func DetailGetPlaysource

func DetailGetPlaysource(url string) (*TengxunPlaysource, error)

DetailGetPlaysource 腾讯归档请求API

type TengxunUserVideoList

type TengxunUserVideoList struct {
	RequestID int    `json:"requestId"`
	Ret       int    `json:"ret"`
	ErrorMsg  string `json:"errorMsg"`
	FuncRet   int    `json:"funcRet"`
	TransInfo struct {
	} `json:"transInfo"`
	Body struct {
		Modules []struct {
			Sections []struct {
				ReportDict struct {
				} `json:"report_dict"`
				SpecialBlocks struct {
				} `json:"special_blocks"`
				OperationMap struct {
				} `json:"operation_map"`
				SectionType       string      `json:"section_type"`
				SectionLayoutType int         `json:"section_layout_type"`
				CSSStruct         interface{} `json:"css_struct"`
				SectionID         string      `json:"section_id"`
				BlockList         struct {
					Blocks []struct {
						OperationMap struct {
							Num0 struct {
								ReportDict struct {
								} `json:"report_dict"`
								OperationType string `json:"operation_type"`
								Operation     struct {
									URL string `json:"url"`
								} `json:"operation"`
								ReportID string `json:"report_id"`
							} `json:"0"`
							Num300 struct {
								ReportDict struct {
								} `json:"report_dict"`
								OperationType string `json:"operation_type"`
								Operation     struct {
									PraiseData struct {
										PraiseType     string `json:"praise_type"`
										PraiseDataKey  string `json:"praise_data_key"`
										PraiseMatchKey string `json:"praise_match_key"`
									} `json:"praise_data"`
									PraiseStatus string `json:"praise_status"`
									PraiseUIInfo struct {
										PraiseCount string `json:"praise_count"`
									} `json:"praise_ui_info"`
									DislikeStatus string `json:"dislike_status"`
								} `json:"operation"`
								ReportID string `json:"report_id"`
							} `json:"300"`
						} `json:"operation_map"`
						MarkLabelListMap struct {
							Num0 struct {
								MarkLabelList []struct {
									MarkLabelType string `json:"mark_label_type"`
									Position      int    `json:"position"`
									PrimeText     string `json:"prime_text"`
									MarkImageURL  string `json:"mark_image_url"`
								} `json:"mark_label_list"`
							} `json:"0"`
						} `json:"mark_label_list_map"`
						ReportDict struct {
							ModID            string `json:"mod_id"`
							Rtype            string `json:"rtype"`
							ItemIdx          string `json:"item_idx"`
							PosterType       string `json:"poster_type"`
							ModIdx           string `json:"mod_idx"`
							Vid              string `json:"vid"`
							TabPersonalValue string `json:"tab_personal_value"`
						} `json:"report_dict"`
						BlockType      string      `json:"block_type"`
						BlockStyleType int         `json:"block_style_type"`
						CSSStruct      interface{} `json:"css_struct"`
						Data           struct {
							TagText  []interface{} `json:"tag_text"`
							CardType string        `json:"card_type"`
							CardInfo struct {
								ImageList []struct {
									ImageURL       string      `json:"image_url"`
									ThumbURL       string      `json:"thumb_url"`
									ImageType      string      `json:"image_type"`
									AspectRatio    float64     `json:"aspect_ratio"`
									ImageFacePoint interface{} `json:"image_face_point"`
									ExtraData      interface{} `json:"extra_data"`
								} `json:"image_list"`
								UserInfo struct {
									AccountInfo struct {
										AccountType int    `json:"account_type"`
										AccountID   string `json:"account_id"`
									} `json:"account_info"`
									UserType     string      `json:"user_type"`
									UserName     string      `json:"user_name"`
									UserImageURL string      `json:"user_image_url"`
									UserLabelURL string      `json:"user_label_url"`
									ExtraData    interface{} `json:"extra_data"`
								} `json:"user_info"`
							} `json:"card_info"`
							Title   string `json:"title"`
							Content string `json:"content"`
							Vid     string `json:"vid"`
						} `json:"data"`
						BlockID   string      `json:"block_id"`
						VnViewID  string      `json:"vn_view_id"`
						ExtraData interface{} `json:"extra_data"`
					} `json:"blocks"`
					OptionalBlocks []interface{} `json:"optional_blocks"`
				} `json:"block_list"`
				ExtraAnyData interface{} `json:"extra_any_data"`
				MergeID      string      `json:"merge_id"`
			} `json:"sections"`
			ReportDict struct {
			} `json:"report_dict"`
			ID           string      `json:"id"`
			ExtraAnyData interface{} `json:"extra_any_data"`
			MergeID      string      `json:"merge_id"`
			UniqueID     string      `json:"unique_id"`
		} `json:"modules"`
		PageContext struct {
			LastVidPosition string `json:"last_vid_position"`
			Offset          string `json:"offset"`
			IndexContext    string `json:"index_context"`
		} `json:"page_context"`
		ReportDict struct {
		} `json:"report_dict"`
		RequestContext struct {
		} `json:"request_context"`
		PrePageContext struct {
		} `json:"pre_page_context"`
		HasNextPage                bool        `json:"has_next_page"`
		StyleCollectionCheckResult interface{} `json:"style_collection_check_result"`
		ReportPageID               string      `json:"report_page_id"`
		ExtraData                  interface{} `json:"extra_data"`
		HasPrePage                 bool        `json:"has_pre_page"`
	} `json:"body"`
}

TengxunUserVideoList 腾讯作者作品列表API

type TxGetPlaysource added in v0.0.23

type TxGetPlaysource struct {
	PlaylistItem struct {
		AsyncParam    string        `json:"asyncParam"`
		BtnList       []interface{} `json:"btnList"`
		BtnPlayURL    string        `json:"btnPlayUrl"`
		BtnTitle      string        `json:"btnTitle"`
		DisplayType   int           `json:"displayType"`
		IndexList     []string      `json:"indexList"`
		Name          string        `json:"name"`
		NeedAsync     bool          `json:"needAsync"`
		PayType       int           `json:"payType"`
		PlVideoType   int           `json:"pl_video_type"`
		RealName      string        `json:"realName"`
		StrIconURL    string        `json:"strIconUrl"`
		Title         string        `json:"title"`
		TotalEpisode  int           `json:"totalEpisode"`
		VideoPlayList []struct {
			EpisodeNumber string        `json:"episode_number"`
			ID            string        `json:"id"`
			MarkLabelList []interface{} `json:"markLabelList"`
			PayType       int           `json:"payType"`
			Pic           string        `json:"pic"`
			PlayURL       string        `json:"playUrl"`
			Title         string        `json:"title"`
			Type          string        `json:"type"`
		} `json:"videoPlayList"`
	} `json:"PlaylistItem"`
	Error int    `json:"error"`
	Msg   string `json:"msg"`
}

type XiguaInfo

type XiguaInfo struct {
	Ck struct {
	} `json:"_ck"`
	Data struct {
		IsOriginal bool   `json:"is_original"`
		Title      string `json:"title"`
		URL        string `json:"url"`
		VideoID    string `json:"video_id"`
	} `json:"data"`
	Success bool `json:"success"`
}

XiguaInfo 西瓜视频信息API

type XiguaUserList

type XiguaUserList struct {
	UserInfo struct {
		Name string `json:"name"`
	} `json:"user_info"`
	Message string `json:"message"`
	HasMore bool   `json:"has_more"`
	Data    []struct {
		MediaName  string `json:"media_name"`
		Title      string `json:"title"`
		ArticleURL string `json:"article_url"`
		GroupIdStr string `json:"group_id_str"`
		BehotTime  int    `json:"behot_time"`
		UserInfo   struct {
			Name string `json:"name"`
		} `json:"user_info"`
	} `json:"data"`
}

XiguaUserList 西瓜TA的视频列表API

Jump to

Keyboard shortcuts

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