config

package
v0.0.0-...-28f2d27 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DocBodySelector   = "document.querySelector('body')"
	ChromeAgentConfig = `Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36`
)

Functions

func GetDataList

func GetDataList(htmlContent string, selector string) (*goquery.Selection, error)

GetDataList 得到数据列表

func GetHTTPHtmlContent

func GetHTTPHtmlContent(url string, selector string, selected interface{}) (htmlContent string, err error)

GetHTTPHtmlContent 获取网站上爬取的数据 url [string] 网址 selector [string] 必须显示的元素 selected [interface] 要抓取的元素

func InitChromedpOptions

func InitChromedpOptions(headless bool) context.Context

InitChromedpOptions 控制是否以无头方式启用Chrome, 初始化参数先传一个空的数据

Types

This section is empty.

Jump to

Keyboard shortcuts

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