We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parente81cfbc commit17958d0Copy full SHA for 17958d0
pkg/scrape/virtualtaboo.go
@@ -34,9 +34,15 @@ func VirtualTaboo(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out
34
sc.HomepageURL=strings.Split(e.Request.URL.String(),"?")[0]
35
36
// Scene ID - get from URL
37
-e.ForEach(`#player`,func(idint,e*colly.HTMLElement) {
38
-sc.SiteID=strings.Split(e.Attr("data-poster-index"),":")[0]
39
-sc.SceneID=slugify.Slugify(sc.Site)+"-"+sc.SiteID
+e.ForEach(`script`,func(idint,e*colly.HTMLElement) {
+ifstrings.Contains(e.Text,"var video =") {
+r:=regexp.MustCompile(`id: (\d+),`)
40
+m:=r.FindStringSubmatch(e.Text)
41
+iflen(m)>0 {
42
+sc.SiteID=m[1]
43
+sc.SceneID=slugify.Slugify(sc.Site)+"-"+sc.SiteID
44
+}
45
46
})
47
48
// Title
@@ -107,7 +113,9 @@ func VirtualTaboo(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out
107
113
sc.Duration=tmpDuration
108
114
109
115
110
-out<-sc
116
+ifsc.SiteID!="" {
117
+out<-sc
118
111
119
112
120
121
siteCollector.OnHTML(`ul.pagination a`,func(e*colly.HTMLElement) {