wget 无法在 url 中工作

wget 无法在 url 中工作

尝试使用 wget 来处理此网址 https://r2---sn-quxapm-3c2l.googlevideo.com/videoplayback?expire=1613883712&ei=4JQxYOWPNCShWJPaqIAN&ip=2001:41d0:2:8d40:cc17:46c2:d42c:2f26&id=o-AMgHI-_l2oQEx2yEFl6l8s6TcF tgkbWLSFN2HA9U6Ri2&itag=22&来源= youtube&requiressl=yes&mh=Wp&mm=31,29&mn=sn-quxapm-3c2l,sn-25ge7nsk&ms=au,rdu&mv=m&mvi=2&pcm2cms=yes&pl=49&initcwndbps=6055000&vprv=1&mime=video/mp4&ns=eTgRBVET2_1 QFX9U54rKe4MF&cnr=14&ratebypass=yes&dur=1346.896&lmt=1609229974564320&mt =1613861794&fvip=2&c=WEB&txp=5535432&n=JUlQJrHUJkc1fqiX&sparams=过期、ei、ip、id、itag、源、requiressl、vprv、mime、ns、cnr、ratebypass、dur、lmt&sig=AOq0QJ8wRgIhaIGuKdTNcaLTYzELFrE 9tZ8HPf6Boqrl4IzdHLVXROMmAiEA3k84fyxXz4X5Kj5Mho4mFqXGpvrjx2BcFre2WKjLkq8=&lsparams=mh,mm,mn,ms ,mv,mvi,pcm2cms,pl,initcwndbps&lsig=AG3C_xAwRAIgfvXjFOtCveYkfXHo69iXkx9oAaShC4lvEAPzH29X2uQCIGjuu08CHjKDiVpGvOlU9Kl70D8pdYTmtM-usprqWXm6&&标题=15+最强+强大+非洲+动物+世界各地

并且会失败并输出:

[1] 5687
[2] 5688
[3] 5689
[4] 5690
[5] 5691
[6] 5692
[7] 5693
[8] 5694
[9] 5695
[10] 5696
[11] 5697
[12] 5698
[13] 5699
[14] 5700
[15] 5701
[16] 5702
[17] 5703
[18] 5704
[19] 5705
[20] 5706
[21] 5707
[22] 5708
[23] 5709
[24] 5710
[25] 5711
[26] 5712
[27] 5713
[28] 5714
[29] 5715
[30] 5716
[31] 5717

[1]+  Stopped                 sudo wget https://r2---sn-quxapm-3c2l.googlevideo.com/videoplayback?expire=1613883712
[2]   Done                    ei=4JQxYOWPNcShWJPaqIAN
[3]   Done                    ip=2001:41d0:2:8d40:cc17:46c2:d42c:2f26
[4]   Done                    id=o-AMgHI-_l2oQEx2yEFl6l8s6TcFtgkbWLSFN2HA9U6Ri2
[5]   Done                    itag=22
[6]   Done                    source=youtube
[7]   Done                    requiressl=yes
[8]   Done                    mh=Wp
[9]   Done                    mm=31,29
[10]   Done                    mn=sn-quxapm-3c2l,sn-25ge7nsk
[11]   Done                    ms=au,rdu
[12]   Done                    mv=m
[13]   Done                    mvi=2
[14]   Done                    pcm2cms=yes
[15]   Done                    pl=49
[16]   Done                    initcwndbps=6055000
[17]   Done                    vprv=1
[18]   Done                    mime=video/mp4
[19]   Done                    ns=eTgRBVET2_1QFX9U54rKe4MF
[20]   Done                    cnr=14
[21]   Done                    ratebypass=yes
[22]   Done                    dur=1346.896
[23]   Done                    lmt=1609229974564320
[24]   Done                    mt=1613861794
[25]   Done                    fvip=2
[26]   Done                    c=WEB
[27]   Done                    txp=5535432
[28]   Done                    n=JUlQJrHUJkc1fqiX
[29]   Done                    sparams=expire,ei,ip,id,itag,source,requiressl,vprv,mime,ns,cnr,ratebypass,dur,lmt
[30]   Done                    sig=AOq0QJ8wRgIhAIGuKdTNcaLTYzELFrE9tZ8HPf6Boqrl4IzdHLVXROMmAiEA3k84fyxXz4X5Kj5Mho4mFqXGpvrjx2BcFre2WKjLkq8=
[31]-  Done                    lsparams=mh,mm,mn,ms,mv,mvi,pcm2cms,pl,initcwndbps

如何解决这个问题?之前非常感谢

答案1

&链接中有很多Bash 中的控制运算符,请在单引号内转义它们:

wget 'https://r2---sn-quxapm-3c2l.googlevideo.com/videoplayback?expire=1613883712&ei=4JQxYOWPNcShWJPaqIAN&ip=2001:41d0:2:8d40:cc17:46c2:d42c:2f26&id=o-AMgHI-_l2oQEx2yEFl6l8s6TcFtgkbWLSFN2HA9U6Ri2&itag=22&source=youtube&requiressl=yes&mh=Wp&mm=31,29&mn=sn-quxapm-3c2l,sn-25ge7nsk&ms=au,rdu&mv=m&mvi=2&pcm2cms=yes&pl=49&initcwndbps=6055000&vprv=1&mime=video/mp4&ns=eTgRBVET2_1QFX9U54rKe4MF&cnr=14&ratebypass=yes&dur=1346.896&lmt=1609229974564320&mt=1613861794&fvip=2&c=WEB&txp=5535432&n=JUlQJrHUJkc1fqiX&sparams=expire,ei,ip,id,itag,source,requiressl,vprv,mime,ns,cnr,ratebypass,dur,lmt&sig=AOq0QJ8wRgIhAIGuKdTNcaLTYzELFrE9tZ8HPf6Boqrl4IzdHLVXROMmAiEA3k84fyxXz4X5Kj5Mho4mFqXGpvrjx2BcFre2WKjLkq8=&lsparams=mh,mm,mn,ms,mv,mvi,pcm2cms,pl,initcwndbps&lsig=AG3C_xAwRAIgfvXjFOtCveYkfXHo69iXkx9oAaShC4lvEAPzH29X2uQCIGjuu08CHjKDiVpGvOlU9Kl70D8pdYTmtM-usprqWXm6&&title=15+Most+Powerful+African+Animals+in+the+World'

另请注意,下载的视频的名称也很难读:

videoplayback?expire=1613883712&ei=4JQxYOWPNcShWJPaqIAN&ip=2001:41d0:2:8d40:cc17:46c2:d42c:2f26&id=o-AMgHI-_l2oQEx2yEFl6l8s6TcFtgkbWLSFN2HA9U6Ri2&itag=22&source=youtube&requiressl=yes&mh=Wp&mm=31,29&mn=sn-quxapm-3c2l,sn-25ge7nsk&ms=au,r

您可以将其重命名:

mv 'videoplayback?expire=1613883712&ei=4JQxYOWPNcShWJPaqIAN&ip=2001:41d0:2:8d40:cc17:46c2:d42c:2f26&id=o-AMgHI-_l2oQEx2yEFl6l8s6TcFtgkbWLSFN2HA9U6Ri2&itag=22&source=youtube&requiressl=yes&mh=Wp&mm=31,29&mn=sn-quxapm-3c2l,sn-25ge7nsk&ms=au,r' video.mp4

相关内容