Fix identify and script scraper bugs (#2375)

* Continue identify if source fails
* Handle empty result set correctly
* Parse null values from scraper script correctly
* Omit warning when json selector value missing
* Return nil when scraped item not found
* Fix graphql validation errors
This commit is contained in:
WithoutPants
2022-03-15 09:42:22 +11:00
committed by GitHub
parent e4d6d3b085
commit 9e3d56b22f
11 changed files with 86 additions and 37 deletions

View File

@@ -239,6 +239,11 @@ func (s scraperSource) ScrapeScene(ctx context.Context, sceneID int) (*models.Sc
return nil, err
}
// don't try to convert nil return value
if content == nil {
return nil, nil
}
if scene, ok := content.(models.ScrapedScene); ok {
return &scene, nil
}