localimagespider

package
v1.6.10 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: AGPL-3.0 Imports: 13 Imported by: 0

README

介绍

  • 插件名:爬取图片到本地
  • 权限:机器人
  • 数据来源:
  • 指令:
    • 抓取Cosplay作品
  • 说明:
    • 本插件目的为抓取网络图片到本地
    • 使用步骤:
      1. 使用 cronjob 插件设定插件任务,定时触发本插件,执行周期建议 1h 以上,这样做的目的是定时任务统一管理
      2. 本插件运行后,会在读取本地图片插件目录下生成图片目录
      3. 通过读取本地图片插件指令读取

预览:

img

Documentation

Index

Constants

View Source
const (
	PageInfoFile         = "pageinfo"
	T2cyComUrl           = "https://t2cy.com"
	CosplayUri           = "/acg/cos"
	CosplayPagerTemplate = "/index_%v.html"
)
View Source
const (
	UA = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
)

Variables

This section is empty.

Functions

func DownloadImage

func DownloadImage(url, referer, folderPath string)
func GetImageLink(url string, selector string) []string

func GetImageLinkInContainer

func GetImageLinkInContainer(url, containerSelector string) []string
func GetTextLink(url string) map[string]string

func GetTextLinkInContainer

func GetTextLinkInContainer(url, containerSelector string) map[string]string

func IsURL

func IsURL(url string) bool

func ReadHtml

func ReadHtml(url string) *goquery.Document

Types

This section is empty.

Jump to

Keyboard shortcuts

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