Skip to content

Commit

Permalink
Revert CoverURL change
Browse files Browse the repository at this point in the history
Seems to have been a one time bug regarding the coverURL with SexbabesVR. Was no need to change the coverURL logic
  • Loading branch information
pops64 committed Oct 15, 2024
1 parent 631a3e3 commit 570206e
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions pkg/scrape/sexbabesvr.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,10 @@ func SexBabesVR(wg *models.ScrapeWG, updateSite bool, knownScenes []string, out
tmp := strings.Split(posterURL, "/")
sc.SiteID = tmp[len(tmp)-2]
sc.SceneID = slugify.Slugify(sc.Site) + "-" + sc.SiteID
// Cover Url
sc.Covers = append(sc.Covers, strings.Replace(e.Attr("poster"), "/videoDetail2x", "", -1))
})

// Cover Url
coverURL := e.Request.Ctx.GetAny("coverURL").(string)
sc.Covers = append(sc.Covers, coverURL)

// Title
e.ForEach(`div.video-detail__description--container h1`, func(id int, e *colly.HTMLElement) {
sc.Title = strings.TrimSpace(e.Text)
Expand Down Expand Up @@ -124,10 +122,7 @@ func SexBabesVR(wg *models.ScrapeWG, updateSite bool, knownScenes []string, out
e.ForEach(`a.video-container__image`, func(cnt int, e *colly.HTMLElement) {
sceneURL := e.Request.AbsoluteURL(e.Attr("href"))
if !funk.ContainsString(knownScenes, sceneURL) {
coverURL := e.ChildAttr("a.video-container__image img", "data-src")
ctx := colly.NewContext()
ctx.Put("coverURL", coverURL)
sceneCollector.Request("GET", sceneURL, nil, ctx, nil)
sceneCollector.Visit(sceneURL)
}
})
})
Expand Down

0 comments on commit 570206e

Please sign in to comment.