pixiv

package
v1.2.5-beta5 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2022 License: Apache-2.0 Imports: 13 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CacheDir = "data/pixiv/"
)
View Source
var IPTables = map[string]string{
	"pixiv.net":   "210.140.92.183:443",
	"i.pximg.net": "210.140.92.142:443",
}

P站 无污染 IP 地址

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 added in v1.2.5

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

Download 多线程下载 link 到 filedir,返回 filedir+filename+suffix, error

func (*Illust) DownloadData added in v1.2.5

func (i *Illust) DownloadData(page int) ([]byte, string, error)

DownloadData 下载第 page 页,返回 data, suffix, error

func (*Illust) DownloadSingleThread added in v1.2.5

func (i *Illust) DownloadSingleThread(page int, filedir, filename string) (string, error)

DownloadSingleThread 单线程下载第 page 页到 filedir/filename.xxx,返回 filedir/filename.suffix, error

func (*Illust) DownloadToCache added in v1.2.5

func (i *Illust) DownloadToCache(page int, filename string) (string, error)

DownloadToCache 多线程下载第 page 页到 CacheDir,返回 CacheDir+filename+suffix, error

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