parsel

package module
v0.0.0-...-2d1445a Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

README

parsel

项目灵感来源于python中的parsel包,可以十分方便的使用xpath解析网页内容

前期计划只提供xpath解析方法。

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Select

type Select struct {
	Text string

	XpathNode         *html.Node
	XpathStringResult []string
	XpathNodeResult   []*html.Node
	// contains filtered or unexported fields
}

func Selector

func Selector(Text string) Select

func (*Select) Get

func (s *Select) Get() (string, bool)

func (*Select) GetAll

func (s *Select) GetAll() ([]string, bool)

func (*Select) GetText

func (s *Select) GetText() string

func (*Select) Help

func (s *Select) Help()

func (*Select) Load

func (s *Select) Load(text string)

func (*Select) Re

func (s *Select) Re(reString string) *Select

func (*Select) Xpath

func (s *Select) Xpath(xpath string) *Select

Jump to

Keyboard shortcuts

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