File tree 2 files changed +6
-1
lines changed
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,11 @@ func (engine *CoolMoviez) updateDownloadProps(downloadCollector *colly.Collector
113
113
downloadCollector .OnHTML ("a.fileName" , func (e * colly.HTMLElement ) {
114
114
movie := & (* movies )[getMovieIndexFromCtx (e .Request )]
115
115
initialLink := e .Attr ("href" )
116
+ re := regexp .MustCompile (`Size:\s+(.*)` )
117
+ stringsub := re .FindStringSubmatch (e .Text )
118
+ if len (stringsub ) > 1 {
119
+ movie .Size = stringsub [1 ]
120
+ }
116
121
117
122
replacePrefix := "https://www.coolmoviez.buzz/file"
118
123
if strings .HasPrefix (initialLink , replacePrefix ) {
Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ func (m *Movie) String() string {
182
182
183
183
// MarshalJSON Json structure to return from api
184
184
func (m * Movie ) MarshalJSON () ([]byte , error ) {
185
- var sDownloadLink map [string ]string
185
+ sDownloadLink := make ( map [string ]string )
186
186
for key , val := range m .SDownloadLink {
187
187
sDownloadLink [key ] = val .String ()
188
188
}
You can’t perform that action at this time.
0 commit comments