Documentation
¶
Index ¶
Constants ¶
View Source
const (
BaseURL = "https://html.duckduckgo.com/html/?q=%s"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SearchResult ¶
type SearchResult struct {
Rank int // 排名
Title string // 标题
URL string // 链接
DisplayURL string // 显示的URL
Source string // 来源网站名称
Snippet string // 摘要
Date string // 日期(如果有)
IsAd bool // 是否是广告
IconURL string // 图标URL
HasDate bool // 是否有日期
}
func ParseNormalResult ¶
func ParseNormalResult(html string) ([]SearchResult, error)
func ParseStaticResult ¶
func ParseStaticResult(html string) ([]SearchResult, error)
Click to show internal directories.
Click to hide internal directories.