diff --git a/cmd/web.go b/cmd/web.go index 94aa3e3..1c8d37a 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -52,7 +52,7 @@ func runWeb(cmd *cobra.Command, args []string) error { AllowedPaths: site.AllowedPaths, ExcludePaths: site.ExcludePaths, OutputAlias: site.OutputAlias, - PathOverrides: site.PathOverrides, + PathOverrides: convertPathOverrides(site.PathOverrides), } } } else { @@ -227,3 +227,15 @@ func sanitizeFilename(name string) string { return name } + +func convertPathOverrides(configOverrides []config.PathOverride) []scraper.PathOverride { + scraperOverrides := make([]scraper.PathOverride, len(configOverrides)) + for i, override := range configOverrides { + scraperOverrides[i] = scraper.PathOverride{ + Path: override.Path, + CSSLocator: override.CSSLocator, + ExcludeSelectors: override.ExcludeSelectors, + } + } + return scraperOverrides +}