Skip to content

Commit

Permalink
debug 3
Browse files Browse the repository at this point in the history
  • Loading branch information
toshski committed Jan 9, 2024
1 parent 61808ed commit 626c791
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/scrape/vrhush.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ func VRHush(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<
sc.MembersUrl = strings.Replace(sc.HomepageURL, "https://vrhush.com/scenes/", "https://ma.vrhush.com/scene/", 1)

// get json data
jsonstring := ""
var jsonResult map[string]interface{}
e.ForEach(`script[Id="__NEXT_DATA__"]`, func(id int, e *colly.HTMLElement) {
jsonstring = e.Text
json.Unmarshal([]byte(e.Text), &jsonResult)
})
jsonResult = jsonResult["props"].(map[string]interface{})
Expand Down Expand Up @@ -93,7 +95,7 @@ func VRHush(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<
sc.TrailerSrc = string(tmpjson)

// Filenames
log.Infof("debug original text %s", e.Text)
log.Infof("debug original text %s", jsonstring)
log.Infof("debug cointent videos %s", content["videos"])
videolList := content["videos"].(map[string]interface{})
for _, video := range videolList {
Expand Down

0 comments on commit 626c791

Please sign in to comment.