Skip to content

Commit

Permalink
scraper: Fix issue getting DarkroomVR Scene Id (xbapps#1694)
Browse files Browse the repository at this point in the history
  • Loading branch information
toshski authored May 3, 2024
1 parent e376fa4 commit 5a00289
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/scrape/darkroomvr.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,12 @@ func DarkRoomVR(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out c
})

// Scene ID
e.ForEach(`a[href*="signup.php?vid"]`, func(id int, e *colly.HTMLElement) {
e.ForEach(`a[href*="signup.php"]`, func(id int, e *colly.HTMLElement) {
url := e.Attr("href")
sc.SiteID = url[strings.LastIndex(url, "=")+1:]
if strings.Contains(url, "vid=") {
sc.SiteID = url[strings.LastIndex(url, "=")+1:]
}
})

// Filenames (only a guess for now, according to the sample files)
suffixes := []string{"4k", "5k", "5k10", "6k", "7k", "960p", "1440p", "psvr_1440p"}
base := e.Request.URL.Path
Expand Down

0 comments on commit 5a00289

Please sign in to comment.