+ 1

How to download video with range http

I would like to download the video from a website but their videos use with html5video element and range HTTP I try to use copy as fetch , it's ok but I can fetch all video in console because it's too large the memory will broke so I try to use powershell(curl),HTTP Client Tool but none of these work when I use Fetch or originally video element,it will return 206 with some mp4 data but when I try to send HTTP in another way it return 200 with nothing powershell(https://i.stack.imgur.com/ZTToR.png) HTTP in dev console Image(https://i.stack.imgur.com/Jex10.png) Request URL: https://vod.chenliedu.com.tw/videoStand3.php?idt=1b09a76e8b38258c9a1cd32d86ade52a&idn=3 Request Method: GET Status Code: 206 Partial Content Remote Address: 211.20.9.136:443 Referrer Policy: no-referrer-when-downgrade RESPONSE Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Connection: close Content-Length: 1397423312 Content-Range: bytes 1397423200-1397423311/1397423312 Content-Type: video/mp4 Date: Sun, 28 Jul 2019 12:44:41 GMT ETag: "5d276ab3-534afcd0" Expires: Thu, 19 Nov 1981 08:52:00 GMT Last-Modified: Thu, 11 Jul 2019 16:58:27 GMT Pragma: no-cache Server: Apache/2.2.15 (CentOS) Set-Cookie: PHPSESSID=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX; path=/ X-Powered-By: PHP/5.6.40 REQUEST accept: */* Accept-Encoding: identity accept-language: zh-TW,zh;q=0.9,en-US;q=0.8,en;q=0.7 Connection: keep-alive Cookie: PHPSESSID=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX; vSizeMode=vsMode_1 Host: vod.chenliedu.com.tw Range: bytes=1397423200- Referer: https://vod.chenliedu.com.tw/videoPlay.php Sec-Fetch-Mode: cors Sec-Fetch-Site: same-origin User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3861.0 Safari/537.36 Edg/77.0.230.0

4th Aug 2019, 9:00 AM
Hsuan
Hsuan - avatar
1 Answer
+ 2
For me, If i would like to put videos for online download, I would use Node.js to set public folder, all video files can be uploaded in public folder for download. I use express.js Code is simply to set public asset folder: const express = require ("express"); const app = express(); app.use(express.static("public")); // set public asset in public folder app.get("/", (req, res)=>{ res.render(index); // you could set all the download path from index.html }); const port = process.env.PORT && 3000; app.listen(port, ()=>console.log("App listening to port " + port); // access index.html by localhost:3000 if test on local
4th Aug 2019, 2:30 PM
CalviŐ˛
CalviŐ˛ - avatar