Query url parameters (#878)

This commit is contained in:
WithoutPants
2020-10-22 11:56:04 +11:00
committed by GitHub
parent 228a5c5537
commit 109e55a25a
7 changed files with 84 additions and 29 deletions

View File

@@ -129,7 +129,11 @@ func (s *xpathScraper) scrapeSceneByFragment(scene models.SceneUpdateInput) (*mo
}
// construct the URL
url := constructSceneURL(s.scraper.QueryURL, storedScene)
queryURL := queryURLParametersFromScene(storedScene)
if s.scraper.QueryURLReplacements != nil {
queryURL.applyReplacements(s.scraper.QueryURLReplacements)
}
url := queryURL.constructURL(s.scraper.QueryURL)
scraper := s.getXpathScraper()
@@ -158,7 +162,11 @@ func (s *xpathScraper) scrapeGalleryByFragment(gallery models.GalleryUpdateInput
}
// construct the URL
url := constructGalleryURL(s.scraper.QueryURL, storedGallery)
queryURL := queryURLParametersFromGallery(storedGallery)
if s.scraper.QueryURLReplacements != nil {
queryURL.applyReplacements(s.scraper.QueryURLReplacements)
}
url := queryURL.constructURL(s.scraper.QueryURL)
scraper := s.getXpathScraper()