Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd774675

Browse files
authored
scraper: Fix filenames for RealJamVR/PornCornVR (#1772)
* rj_filenamesscraper: fix missing filenames and add HBR option* default_60fpsPornCornVR doesn't supply fps in "download" file details
1 parent17958d0 commitd774675

File tree

1 file changed

+7
-23
lines changed

1 file changed

+7
-23
lines changed

‎pkg/scrape/realjamvr.go

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package scrape
33
import (
44
"encoding/json"
55
"net/http"
6-
"net/url"
76
"regexp"
87
"strconv"
98
"strings"
@@ -120,38 +119,23 @@ func RealJamSite(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out
120119
})
121120

122121
// Filenames
123-
fileMask:=""
124-
// any "download/" links on the public site will be for trailers, use one trailer to get the basis of the scenes filenames
125-
e.ForEachWithBreak(`a[href^='download/']`,func(idint,e*colly.HTMLElement)bool {
126-
trailerurl:=sc.HomepageURL+"/"+e.Attr("href")
127-
// url does not point directly to a file, need to resolve redirects with http.Head
128-
resp,err:=http.Head(trailerurl)
129-
iferr==nil {
130-
params,err:=url.ParseQuery(resp.Request.URL.RawQuery)
131-
iferr==nil {
132-
iffileMaskTmp,ok:=params["bcdn_filename"];ok {
133-
tmp:=strings.Split(fileMaskTmp[0],"_")
134-
iflen(tmp)>4 {
135-
fileMask=strings.TrimSuffix(tmp[0],"-Trailer")+"-Full_$res_$fps_"+tmp[3]+"_"+tmp[4]
136-
returnfalse
137-
}
138-
}
139-
}
140-
}
141-
returntrue
142-
})
122+
fileMasktmp:=strings.Split(sc.HomepageURL,"/")
123+
fileMask:=strings.Replace(sc.Site," ","",-1)+"-"+fileMasktmp[len(fileMasktmp)-1]+"-Full$res_$fps_LR_180.mp4"
143124

144125
// any "/join/" links on the public site will be for for the full movie
145126
uniqueFilenames:=make(map[string]bool)
146127
e.ForEach(`a[href='/join/']`,func(idint,e*colly.HTMLElement) {
147128
resolution:=""
148-
fps:=""
129+
fps:="60"
149130
e.ForEach(`div div`,func(idint,e*colly.HTMLElement) {
150131
txt:=strings.TrimSpace(e.Text)
151132
ifstrings.HasPrefix(txt,"Full ") {
152133
index:=strings.Index(txt,"p")
153134
ifindex!=-1 {
154-
resolution=txt[5:index]
135+
resolution="_"+txt[5:index]
136+
}
137+
ifstrings.HasSuffix(txt,"HBR") {
138+
resolution="-HBR"+resolution
155139
}
156140
}else {
157141
ifstrings.HasSuffix(txt,"fps") {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp