Add JSON scrape support (#717)

* Add support for scene fragment scrape in xpath
This commit is contained in:
WithoutPants
2020-08-10 14:21:50 +10:00
committed by GitHub
parent 470a2b5833
commit 7158e83b75
28 changed files with 5005 additions and 14 deletions

View File

@@ -191,3 +191,14 @@ func (s *stashScraper) scrapePerformerByURL(url string) (*models.ScrapedPerforme
func (s *stashScraper) scrapeSceneByURL(url string) (*models.ScrapedScene, error) {
return nil, errors.New("scrapeSceneByURL not supported for stash scraper")
}
func sceneFromUpdateFragment(scene models.SceneUpdateInput) (*models.Scene, error) {
qb := models.NewSceneQueryBuilder()
id, err := strconv.Atoi(scene.ID)
if err != nil {
return nil, err
}
// TODO - should we modify it with the input?
return qb.Find(id)
}