mirror of
https://github.com/karust/openserp.git
synced 2026-08-05 16:53:54 +08:00
27 lines
992 B
Go
27 lines
992 B
Go
package baidu
|
|
|
|
// Selectors is the single source of truth for Baidu SERP CSS selectors.
|
|
var Selectors = struct {
|
|
Captcha string
|
|
Timeout string
|
|
Results string
|
|
ResultsAlt []string
|
|
AdMarkers []string
|
|
ImageJSONRoot []string
|
|
Link string
|
|
Desc string
|
|
// DescAlt are additional description containers tried when Desc misses.
|
|
// Baidu varies abstract markup across feature blocks (info cards, news rows).
|
|
DescAlt []string
|
|
}{
|
|
Captcha: "div.passMod_dialog-wrapper",
|
|
Timeout: "button.timeout-button",
|
|
Results: "#content_left div.result.c-container",
|
|
ResultsAlt: []string{"#content_left div.result-op.c-container", "div.c-container.new-pmd"},
|
|
AdMarkers: []string{"[data-tuiguang]", "[data-click*='tuiguang']", ".ec-tuiguang", ".c-icon-bear-p"},
|
|
ImageJSONRoot: []string{"body > pre", "pre"},
|
|
Link: "a",
|
|
Desc: "div.c-abstract",
|
|
DescAlt: []string{".content-right_8Zs40", ".summary-gap_3Jb4I"},
|
|
}
|