Skip to content

Commit

Permalink
scraper: Fix CzechVR scraper and CzechVR funscript scraper (xbapps#1528)
Browse files Browse the repository at this point in the history
Co-authored-by: crwxaj <crwxaj>
  • Loading branch information
crwxaj authored Nov 30, 2023
1 parent 2613b1c commit d20d2a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/scrape/czechvr.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,15 @@ func CzechVR(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan

siteCollector.OnHTML(`div.postTag`, func(e *colly.HTMLElement) {
sceneURL := ""
e.ForEach(`div.navez h2 a`, func(id int, e *colly.HTMLElement) {
e.ForEach(`div.nazev h2 a`, func(id int, e *colly.HTMLElement) {
sceneURL = e.Request.AbsoluteURL(e.Attr("href"))
// If scene exist in database, there's no need to scrape
if !funk.ContainsString(knownScenes, sceneURL) {
sceneCollector.Visit(sceneURL)
}
})
if config.Config.Funscripts.ScrapeFunscripts {
e.ForEach(`div.interactive`, func(id int, e *colly.HTMLElement) {
e.ForEach(`div.iconinteractive`, func(id int, e *colly.HTMLElement) {
var existingScene models.Scene
existingScene.GetIfExistURL(sceneURL)
if existingScene.ID != 0 && existingScene.ScriptPublished.IsZero() {
Expand Down

0 comments on commit d20d2a8

Please sign in to comment.