feat: Implement scraping of multiple URLs with optional CSS locators and separate output files

This commit is contained in:
Arik Jones (aider)
2024-09-14 20:35:35 -05:00
parent 5264023cba
commit 52c7de255d
3 changed files with 145 additions and 28 deletions

View File

@@ -15,8 +15,14 @@ type Config struct {
}
type ScrapeConfig struct {
URL string `yaml:"url"`
CSSLocator string `yaml:"css_locator"`
URLs []URLConfig `yaml:"urls"`
OutputType string `yaml:"output_type"`
}
type URLConfig struct {
URL string `yaml:"url"`
CSSLocator string `yaml:"css_locator"`
OutputAlias string `yaml:"output_alias"`
}
func Load(configPath string) (*Config, error) {