Documentation
¶
Index ¶
- Constants
- func AutoVerification(img image.Image, outputShape ort.Shape) string
- func Base64ToImage(base64Str string) (image.Image, error)
- func CalculateJPEGMD5(img image.Image, quality int) (string, error)
- func ConvertToGray(img image.Image) *image.Gray
- func CookiesAddNoRepetition(addTarget *[]*http.Cookie, oldTarget []*http.Cookie)
- func CookiesFiltration(keys []string, cookies []*http.Cookie) []*http.Cookie
- func CqieEncrypt(str string) []byte
- func DeleteFile(path string)
- func GetFaceBase64() (image.Image, error)
- func ImageRGBDisturb(img image.Image) image.Image
- func ImageToGrayFloatArray(img image.Image) []float32
- func IsBadImg(imgFile string) bool
- func LoadImage(filePath string) (image.Image, error)
- func ParseWorkInform(doc *goquery.Document) (map[string]interface{}, error)
- func PathExistForCreate(path string)
- func PathExists(path string) (bool, error)
- func ReadImg(imgFile string) (image.Image, error)
- func ResizeImage(img image.Image, width, height uint) *image.RGBA
- func RunFuncName() string
- func SaveImageAsJPEG(img image.Image, path string) error
- func TokenHex(len int) string
- func YatoriCoreInit()
- type QuestionSet
Constants ¶
View Source
const (
DefaultUserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36 Edg/136.0.0.0"
)
常用的User-Agent
Variables ¶
This section is empty.
Functions ¶
func Base64ToImage ¶ added in v1.5.0
base64转图片
func CalculateJPEGMD5 ¶ added in v1.6.5
使用 JPEG 编码图像后计算其 MD5
func CookiesAddNoRepetition ¶ added in v1.8.0
添加Cookies,并且是无重复添加,意思就是添加到目标Cookies里面时会检测是否有重复Key的Cookie,如果有则直接替换Cookie值
func CookiesFiltration ¶ added in v1.8.1
过滤并获取指定Cookies并返回
func DeleteFile ¶
func DeleteFile(path string)
func ImageToGrayFloatArray ¶
图片转一维数组数据 ImageToGrayFloatArray 将灰度图像转换为一维浮点数组,范围为 [0.0, 1.0]
func ParseWorkInform ¶ added in v1.4.2
用于截取作业信息中用于回答回答题目的关键参数
func ResizeImage ¶
ResizeImage 将图片缩放到指定宽度和高度并返回 RGB 图像
func SaveImageAsJPEG ¶ added in v1.6.5
saveImageAsJPEG 将图像保存为 JPEG 到指定路径
func YatoriCoreInit ¶
func YatoriCoreInit()
Types ¶
type QuestionSet ¶ added in v1.1.2
QuestionSet 结构体用于存储每个 div.Py-mian1 的原始 HTML 内容
func ParseQuestionSets ¶ added in v1.1.2
func ParseQuestionSets(doc *goquery.Document) []QuestionSet
ParseQuestionSets 函数用于提取所有 div.Py-mian1 节点的原始 HTML 内容
Source Files
¶
Click to show internal directories.
Click to hide internal directories.