potCollector

package module
v0.0.0-...-8df7385 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36"
	Encoding  = "Shift-JIS"
)

Variables

This section is empty.

Functions

func GetDocument

func GetDocument(url string) (*goquery.Document, error)

Types

type Article

type Article struct {
	Selection        *goquery.Selection
	ID               uint32
	Name             string
	Date             *time.Time
	UID              string
	Text             string
	AnchorArticleIDs []uint32
	IsOver1000       bool
}

func NewArticle

func NewArticle(s *goquery.Selection) *Article

func (*Article) LoadArticle

func (p *Article) LoadArticle() error

type Articles

type Articles struct {
	List  []*Article
	Count uint
}

func (*Articles) Append

func (p *Articles) Append(a *Article)

type Board

type Board struct {
	Threads *Threads
}

func NewBoard

func NewBoard() *Board

func (*Board) LoadThreadListDocument

func (p *Board) LoadThreadListDocument(listURL string) (*goquery.Document, error)

func (*Board) LoadThreads

func (p *Board) LoadThreads(doc *goquery.Document) error

type Thread

type Thread struct {
	Selection         *goquery.Selection
	ID                uint64
	Title             string
	LastArticleID     uint32
	LastReadArticleID uint32
	Articles          *Articles
}

func NewThread

func NewThread(s *goquery.Selection) *Thread

func (*Thread) LoadArticleDocument

func (p *Thread) LoadArticleDocument(baseURL string) (*goquery.Document, error)

func (*Thread) LoadArticles

func (p *Thread) LoadArticles(doc *goquery.Document) error

func (*Thread) LoadThread

func (p *Thread) LoadThread() error

type Threads

type Threads struct {
	List  []*Thread
	Count uint
}

func (*Threads) Append

func (p *Threads) Append(t *Thread)

func (*Threads) FilterThread

func (p *Threads) FilterThread(f func(*Thread) bool)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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