pixiv

package module
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2022 License: MIT Imports: 20 Imported by: 0

README

Documentation

Overview

Package pixiv

a pixiv spider in go

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func KeyWord

func KeyWord(word string) *keyWord

KeyWord Constructor of keyword of pictures.

word -keyword to search.

Example
package main

import (
	"github.com/yfaimisaka/pixiv"
)

func main() {
	pixiv.KeyWord("夏娜").Num(10).Download()
	pixiv.KeyWord("优库里伍德").Num(20).Upload() // upload to minio server
}
Output:

func Rank

func Rank() *rank

Rank Constructor of rank per month.

Example

Note, before call Rank(), you need to create cookie.txt file in root, and paste request cookie into it.

package main

import (
	"github.com/yfaimisaka/pixiv"
)

func main() {
	pixiv.Rank().Num(10).DownLoad()
}
Output:

func Single

func Single(workId string) *single

Single Constructor of single picture.

workId -the id of the single picture.

Example
package main

import (
	"github.com/yfaimisaka/pixiv"
)

func main() {
	pixiv.Single("100510734").Name("蒜").Download() // or .Upload()
}
Output:

func Tag

func Tag(tagName string) *tag

Tag Constructor of tag of pictures.

tagName -name of tag, can't be multi.

Example
package main

import (
	"github.com/yfaimisaka/pixiv"
)

func main() {
	pixiv.Tag("錦木千束").Num(10).Download()
	pixiv.Tag("錦木千束").Num(20).Upload() // upload to minio server
}
Output:

func User

func User(userId string) *user

User Constructor of userId of pictures.

userId -id of the user.

Example
package main

import (
	"github.com/yfaimisaka/pixiv"
)

func main() {
	pixiv.User("26560096").Num(20).Download()
	pixiv.User("26560096").Name("someone").Upload()
}
Output:

Types

This section is empty.

Jump to

Keyboard shortcuts

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