parser

package
v0.0.0-...-b6a2cce Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2018 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WebParsers = NewParserSetterSet()

Functions

This section is empty.

Types

type Ip66

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

func (*Ip66) GetMaxPageNum

func (i *Ip66) GetMaxPageNum(maxNum int) (int, error)

func (*Ip66) GetParserName

func (i *Ip66) GetParserName() string

func (*Ip66) GetUrl

func (i *Ip66) GetUrl() string

func (*Ip66) PageParser

func (i *Ip66) PageParser(html string) ([]ProxyIP, error)

type Ip66Setter

type Ip66Setter struct{}

func (*Ip66Setter) SettingParser

func (i *Ip66Setter) SettingParser() Parser

FIXME: [ ] Support: url: http://www.66ip.cn/%d.html

type Kuaidaili

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

func (*Kuaidaili) GetMaxPageNum

func (k *Kuaidaili) GetMaxPageNum(maxNum int) (int, error)

func (*Kuaidaili) GetParserName

func (k *Kuaidaili) GetParserName() string

func (*Kuaidaili) GetUrl

func (k *Kuaidaili) GetUrl() string

func (*Kuaidaili) PageParser

func (k *Kuaidaili) PageParser(html string) ([]ProxyIP, error)

type KuaidailiSetter

type KuaidailiSetter struct{}

func (*KuaidailiSetter) SettingParser

func (k *KuaidailiSetter) SettingParser() Parser

type Parser

type Parser interface {
	PageParser(html string) ([]ProxyIP, error)
	GetUrl() string
	GetMaxPageNum(maxNum int) (int, error)
}

type ParserSetter

type ParserSetter interface {
	SettingParser() Parser
}

type ParserSetterSet

type ParserSetterSet map[string]ParserSetter

func NewParserSetterSet

func NewParserSetterSet() ParserSetterSet

func (ParserSetterSet) DelParserSetter

func (p ParserSetterSet) DelParserSetter(name string)

func (ParserSetterSet) GetNames

func (p ParserSetterSet) GetNames() []string

func (ParserSetterSet) GetParserSetter

func (p ParserSetterSet) GetParserSetter(name string) (ParserSetter, bool)

func (ParserSetterSet) GetParserSetters

func (p ParserSetterSet) GetParserSetters() []ParserSetter

func (ParserSetterSet) SetParserSetter

func (p ParserSetterSet) SetParserSetter(name string, setter ParserSetter) bool

type Xici

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

func (*Xici) GetMaxPageNum

func (x *Xici) GetMaxPageNum(maxNum int) (int, error)

func (*Xici) GetParserName

func (x *Xici) GetParserName() string

func (*Xici) GetUrl

func (x *Xici) GetUrl() string

func (*Xici) PageParser

func (x *Xici) PageParser(html string) ([]ProxyIP, error)

type XiciSetter

type XiciSetter struct{}

func (*XiciSetter) SettingParser

func (x *XiciSetter) SettingParser() Parser

Jump to

Keyboard shortcuts

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