Skip to content

Commit

Permalink
scraper: Fix TmwVRnet scraper not picking up subsequent pages (xbapps…
Browse files Browse the repository at this point in the history
  • Loading branch information
toshski authored Nov 24, 2023
1 parent e6f38b6 commit f234eb3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/scrape/tmwvrnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,11 @@ func TmwVRnet(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out cha
out <- sc
})

siteCollector.OnHTML(`div.pagination__element.next a`, func(e *colly.HTMLElement) {
pageURL := e.Request.AbsoluteURL(e.Attr("href"))
siteCollector.Visit(pageURL)
siteCollector.OnHTML(`a.pagination-element__link`, func(e *colly.HTMLElement) {
if strings.Contains(e.Text, "Next") {
pageURL := e.Request.AbsoluteURL(e.Attr("href"))
siteCollector.Visit(pageURL)
}
})

siteCollector.OnHTML(`div.thumb-photo`, func(e *colly.HTMLElement) {
Expand Down

0 comments on commit f234eb3

Please sign in to comment.