sxcrawler

package module
v0.0.0-...-a963958 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2020 License: MIT Imports: 17 Imported by: 0

README

sx-crawler

🏫三院(重庆三峡学院)教务管理系统爬虫🕷️

Intro

爬取你的所有课程信息、四六级成绩(太懒了,不做了)存储到Markdown文件中

Installation

go get github.com/eanson023/sxcrawler

Usage

package main

import (
	"github.com/eanson023/sxcrawler"
)

func main() {
	defer sxcrawler.Done()
	rg, err := sxcrawler.Login("学号", "密码")
	if err != nil {
		panic(err)
	}
	rg.GetAllCourseInfo().StoreToMarkdown("信息.md")
}

Documentation

Index

Constants

View Source
const (
	//UTF8 UTF8字符
	UTF8 encoding = 1 + iota
	//GBK 国标码
	GBK
)

Variables

This section is empty.

Functions

func Done

func Done()

Done 结束删除验证码文件

func PrintRequest

func PrintRequest(request *http.Request, charset encoding)

PrintRequest 打印请求信息

func PrintResponse

func PrintResponse(response *http.Response, charset encoding)

PrintResponse 打印响应信息

Types

type RequestGeneral

type RequestGeneral struct {
	// contains filtered or unexported fields
}

RequestGeneral ...

func Login

func Login(username string, password string) (*RequestGeneral, error)

Login ... 程序入口

func (*RequestGeneral) GetAllCourseInfo

func (rg *RequestGeneral) GetAllCourseInfo() *studentInfo

GetAllCourseInfo 获取所有学期的分数

func (*RequestGeneral) GetCourseInfo

func (rg *RequestGeneral) GetCourseInfo(yearStart int, yearEnd int) *studentInfo

GetCourseInfo 获取某几年的课程信息

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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