image_finder

package
v0.0.0-...-312110e Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PATH = "data/pixiv/cache"
View Source
var SensitiveWords = map[string]bool{
	"R-18":  true,
	"R-18G": true,
	"R18G":  true,
	"R18":   true,
}

Functions

func Suiji

func Suiji(max int) int

Suiji 从json里的30条数据中随机获取一条返回

Types

type AutoGenerated

type AutoGenerated struct {
	Illusts []struct {
		ID        int    `json:"id"`
		Title     string `json:"title"`
		Type      string `json:"type"`
		ImageUrls struct {
			SquareMedium string `json:"square_medium"`
			Medium       string `json:"medium"`
			Large        string `json:"large"`
		} `json:"image_urls"`
		Caption  string `json:"caption"`
		Restrict int    `json:"restrict"`
		User     struct {
			ID               int    `json:"id"`
			Name             string `json:"name"`
			Account          string `json:"account"`
			ProfileImageUrls struct {
				Medium string `json:"medium"`
			} `json:"profile_image_urls"`
			IsFollowed bool `json:"is_followed"`
		} `json:"user"`
		Tags []struct {
			Name           string      `json:"name"`
			TranslatedName interface{} `json:"translated_name"`
		} `json:"tags"`
		Tools          []interface{} `json:"tools"`
		PageCount      int           `json:"page_count"`
		Width          int           `json:"width"`
		Height         int           `json:"height"`
		SanityLevel    int           `json:"sanity_level"`
		XRestrict      int           `json:"x_restrict"`
		Series         interface{}   `json:"series"`
		MetaSinglePage struct {
			OriginalImageURL string `json:"original_image_url"`
		} `json:"meta_single_page,omitempty"`
		MetaPages      []interface{} `json:"meta_pages"`
		TotalView      int           `json:"total_view"`
		TotalBookmarks int           `json:"total_bookmarks"`
		IsBookmarked   bool          `json:"is_bookmarked"`
		Visible        bool          `json:"visible"`
		IsMuted        bool          `json:"is_muted"`
	} `json:"illusts"`
	NextURL         string `json:"next_url"`
	SearchSpanLimit int    `json:"search_span_limit"`
}

Jump to

Keyboard shortcuts

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