mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Add cdp support for xpath scrapers (#625)
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
@@ -43,6 +43,9 @@ type config struct {
|
||||
|
||||
// Xpath scraping configurations
|
||||
XPathScrapers mappedScrapers `yaml:"xPathScrapers"`
|
||||
|
||||
// Scraping driver options
|
||||
DriverOptions *scraperDriverOptions `yaml:"driver"`
|
||||
}
|
||||
|
||||
func (c config) validate() error {
|
||||
@@ -135,6 +138,11 @@ type scraperDebugOptions struct {
|
||||
PrintHTML bool `yaml:"printHTML"`
|
||||
}
|
||||
|
||||
type scraperDriverOptions struct {
|
||||
UseCDP bool `yaml:"useCDP"`
|
||||
Sleep int `yaml:"sleep"`
|
||||
}
|
||||
|
||||
func loadScraperFromYAML(id string, reader io.Reader) (*config, error) {
|
||||
ret := &config{}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user