我尝试下载视频而不在我的Android默认浏览器或Firefox中播放。 我已经尝试过如下所示:
<a href="https://something.googlevideo.com/xxxxxx&title=Video+Title" download>Download</a>
<a href="https://something.googlevideo.com/xxxxxx&title=Video+Title" target="_blank" download>Download</a>
<a href="https://something.googlevideo.com/xxxxxx&title=Video+Title" rel=”external" download>Download</a>
url: https://r1---sn-bg5hxxo2ivox-q5jz.googlevideo.com/videoplayback?aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C278%2C394%2C395%2C396%2C397%2C398&fvip=1&sparams=aitags%2Cclen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&mime=video%2Fmp4&id=o-ALRV5YpAaCpyILP6H-8loaZj-ZDemJBajF3jtnfwxUch&itag=398&dur=240.320&clen=30917236&lmt=1539885977797930&ip=119.30.32.177&key=yt6&expire=1553211455&c=WEB&ei=3suTXOHhPKS88QP8vYCoDg&ms=au%2Crdu&mt=1553189732&mv=m&ipbits=0&mm=31%2C29&mn=sn-bg5hxxo2ivox-q5jz%2Csn-npoeene6&requiressl=yes&keepalive=yes&source=youtube&txp=5511222&pl=24&gir=yes&initcwndbps=63750&title=ytdl.ml+-++Guru+Randhawa_+Ban+Ja+Rani+Video+Song+With+Lyrics+_+Tumhari+Sulu+_+Vidya+Balan+Manav+Kaul+&ratebypass=yes&signature=0CC08F953D3A80FE8283591B910AD243B57069E8.A1F38C1FDD6E9BA461C4A69210106728890DE858
我不想在服务器中下载该视频。 如何使用PHP或JavaScript或HTML下载该视频?
答案 0 :(得分:1)
download
html属性仅在文件位于网页的相同URL上时有效。
要下载外部URL,外部服务器必须发送下载HTTP标头
使其工作的另一种方法是在服务器上创建代理,这样下载URL将与网站相同,但是每次下载都会使用服务器的网络流量(不是个好主意)