File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -223,7 +223,7 @@ func DownloadVideo(url string) {
223
223
if end > fileLength {
224
224
end = fileLength
225
225
}
226
- req .Header . Set ( "Range" , fmt . Sprintf ( "bytes=%d-%d" , start , end ) )
226
+ req .URL . RawQuery = req . URL . Query (). Encode () + "&range=" + strconv . Itoa ( start ) + "-" + strconv . Itoa ( end )
227
227
resp , err := client .Do (req )
228
228
if err != nil {
229
229
printErrorProps := S.PrintErrorProps {
@@ -245,7 +245,7 @@ func DownloadVideo(url string) {
245
245
bar .Set (fileLength )
246
246
bar .Finish ()
247
247
} else {
248
- req .Header . Set ( "Range" , fmt . Sprintf ( "Bytes=0-%d" , fileLength ) )
248
+ req .URL . RawQuery = req . URL . Query (). Encode () + "&range=" + strconv . Itoa ( 0 ) + "-" + strconv . Itoa ( fileLength )
249
249
resp , err = client .Do (req )
250
250
if err != nil {
251
251
printErrorProps := S.PrintErrorProps {
You can’t perform that action at this time.
0 commit comments