@@ -3,7 +3,6 @@ package scrape
3
3
import (
4
4
"encoding/json"
5
5
"net/http"
6
- "net/url"
7
6
"regexp"
8
7
"strconv"
9
8
"strings"
@@ -120,38 +119,23 @@ func RealJamSite(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out
120
119
})
121
120
122
121
// 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 (id int ,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
- if err == nil {
130
- params ,err := url .ParseQuery (resp .Request .URL .RawQuery )
131
- if err == nil {
132
- if fileMaskTmp ,ok := params ["bcdn_filename" ];ok {
133
- tmp := strings .Split (fileMaskTmp [0 ],"_" )
134
- if len (tmp )> 4 {
135
- fileMask = strings .TrimSuffix (tmp [0 ],"-Trailer" )+ "-Full_$res_$fps_" + tmp [3 ]+ "_" + tmp [4 ]
136
- return false
137
- }
138
- }
139
- }
140
- }
141
- return true
142
- })
122
+ fileMasktmp := strings .Split (sc .HomepageURL ,"/" )
123
+ fileMask := strings .Replace (sc .Site ," " ,"" ,- 1 )+ "-" + fileMasktmp [len (fileMasktmp )- 1 ]+ "-Full$res_$fps_LR_180.mp4"
143
124
144
125
// any "/join/" links on the public site will be for for the full movie
145
126
uniqueFilenames := make (map [string ]bool )
146
127
e .ForEach (`a[href='/join/']` ,func (id int ,e * colly.HTMLElement ) {
147
128
resolution := ""
148
- fps := ""
129
+ fps := "60 "
149
130
e .ForEach (`div div` ,func (id int ,e * colly.HTMLElement ) {
150
131
txt := strings .TrimSpace (e .Text )
151
132
if strings .HasPrefix (txt ,"Full " ) {
152
133
index := strings .Index (txt ,"p" )
153
134
if index != - 1 {
154
- resolution = txt [5 :index ]
135
+ resolution = "_" + txt [5 :index ]
136
+ }
137
+ if strings .HasSuffix (txt ,"HBR" ) {
138
+ resolution = "-HBR" + resolution
155
139
}
156
140
}else {
157
141
if strings .HasSuffix (txt ,"fps" ) {