Add http headers support to scraper (#1273)

This commit is contained in:
bnkai
2021-04-16 08:42:56 +03:00
committed by GitHub
parent 0b40017b09
commit cd6b6b74eb
4 changed files with 84 additions and 11 deletions

View File

@@ -175,11 +175,17 @@ type clickOptions struct {
Sleep int `yaml:"sleep"`
}
type header struct {
Key string `yaml:"Key"`
Value string `yaml:"Value"`
}
type scraperDriverOptions struct {
UseCDP bool `yaml:"useCDP"`
Sleep int `yaml:"sleep"`
Clicks []*clickOptions `yaml:"clicks"`
Cookies []*cookieOptions `yaml:"cookies"`
Headers []*header `yaml:"headers"`
}
func loadScraperFromYAML(id string, reader io.Reader) (*config, error) {