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 ¶
GetDataList 得到数据列表
func GetHTTPHtmlContent ¶
func GetHTTPHtmlContent(url string, selector string, selected interface{}) (htmlContent string, err error)
GetHTTPHtmlContent 获取网站上爬取的数据 url [string] 网址 selector [string] 必须显示的元素 selected [interface] 要抓取的元素
func InitChromedpOptions ¶
InitChromedpOptions 控制是否以无头方式启用Chrome, 初始化参数先传一个空的数据
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.