gpt4 book ai didi

javascript - 如何下载外部视频而不在浏览器中播放?

转载 作者:行者123 更新时间:2023-12-02 23:58:12 25 4
gpt4 key购买 nike

我尝试下载视频而不在 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 下载此视频?

最佳答案

download html 属性仅在文件位于网页的同一 URL 上时才有效。

要下载外部 URL,外部服务器必须发送下载 HTTP header

使其工作的其他方法是在您的服务器上创建一个代理,这样下载 URL 将与网站相同,但每次下载都会使用您的服务器网络流量(不是好主意)

<a> download attribute not working anymore

关于javascript - 如何下载外部视频而不在浏览器中播放?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55286098/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com