pixiv

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const CacheDir = "data/pixiv/"

Variables

This section is empty.

Functions

This section is empty.

Types

type Illust

type Illust struct {
	Pid         int64    `db:"pid"`
	Title       string   `db:"title"`
	Caption     string   `db:"caption"`
	Tags        string   `db:"tags"`
	ImageUrls   []string `db:"image_urls"`
	AgeLimit    string   `db:"age_limit"`
	CreatedTime string   `db:"created_time"`
	UserId      int64    `db:"user_id"`
	UserName    string   `db:"user_name"`
}

插画结构体

func Works

func Works(id int64) (i *Illust, err error)

Works 获取插画信息

func (*Illust) Download

func (i *Illust) Download(page int, path string) error

Download 多线程下载 page 页到 filepath, 返回 error

func (*Illust) DownloadToCache

func (i *Illust) DownloadToCache(page int) error

DownloadToCache 多线程下载第 page 页到 i.Path(page), 返回 error

func (*Illust) Path

func (i *Illust) Path(page int) string

Path 图片本地缓存路径

type RankValue

type RankValue struct {
	/* required, possible rank modes:
		- daily (default)
	    - weekly
	    - monthly
	    - rookie
	    - original
	    - male
	    - female
	    - daily_r18
	    - weekly_r18
	    - male_r18
	    - female_r18
	    - r18g
	*/
	Mode string
	/* optional, possible rank type:
	    - all (default)
	    - illust
		- ugoira
		- manga
	*/
	Type string
	Page int
	Date string
}

搜索元素

func (RankValue) Rank

func (value RankValue) Rank() (r [18]int, err error)

画作排行榜

Jump to

Keyboard shortcuts

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