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 parent32b9776 commit631a3e3Copy full SHA for 631a3e3
pkg/scrape/vrspy.go
@@ -37,18 +37,26 @@ func VRSpy(wg *models.ScrapeWG, updateSite bool, knownScenes []string, out chan<
37
sc.Site=siteID
38
sc.HomepageURL=e.Request.URL.String()
39
40
-ogimage:=e.ChildAttr(`meta[property="og:image"][content*="cover.jpg"]`,"content")
41
-ifogimage!="" {
42
-ogimageURL,err:=url.Parse(ogimage)
43
-iferr==nil {
44
-parts:=strings.Split(ogimageURL.Path,"/")
45
-iflen(parts)>2 {
46
-sc.SiteID=parts[2]
+e.ForEach(`meta[property="og:image"][content*="vrspy.com/videos"]`,func(idint,e*colly.HTMLElement) {
+ifsc.SiteID=="" {
+ogimage:=e.Attr("content")
+ifogimage!="" {
+ogimageURL,err:=url.Parse(ogimage)
+iferr==nil {
+parts:=strings.Split(ogimageURL.Path,"/")
47
+iflen(parts)>2 {
48
+_,err:=strconv.Atoi(parts[2])
49
50
+sc.SiteID=parts[2]
51
+}
52
53
54
}
55
-}
56
+})
57
58
ifsc.SiteID=="" {
59
+log.Infof("Unable to determine a Scene Id for %s",e.Request.URL)
60
return
61
62