Skip to content

Commit

Permalink
Update vrphub.go
Browse files Browse the repository at this point in the history
  • Loading branch information
gaarder authored Jan 21, 2025
1 parent a68c97e commit 174e436
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/scrape/vrphub.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,16 @@ func VRPHub(wg *models.ScrapeWG, updateSite bool, knownScenes []string, out chan

// Duration
sc.Duration = 0
reDuration := regexp.MustCompile(`^WATCH FULL VIDEO ([0-9]+:*[0-9]*) MIN$`)
e.ForEach(`a.maxbutton-get-the-full-video-now`, func(id int, e *colly.HTMLElement) {
tmpDuration := reDuration.FindStringSubmatch(e.Text)
if tmpDuration != nil {
intDuration, err := strconv.Atoi(strings.Split(tmpDuration[1], ":")[0])
if err == nil {
sc.Duration = intDuration
}
}
})

// There are 2 places we can find filenames from - one is in the video
// previews, and one is in the trailer download section. Some posts
Expand Down

0 comments on commit 174e436

Please sign in to comment.