wget命令,用于在对allocine进行请求身份验证后下载视频

时间:2019-06-01 21:13:20

标签: bash sh

我不知道我必须在我的wget命令行中保留并介绍登录页面https://salles.allocine.fr的谁和哪个字段

用于bash脚本,该脚本将下载预告片以显示为其分配的播放列表

尝试使用以下命令行:

wget --post-data="Username=MyUserId&Password=MyPass" --keep-session-cookies --save-cookies cookies.txt "https://salles.allocine.fr/Account/LogOn?ReturnUrl=%2fVideoDownloads%2fDownloadVideo%2f19583540%0A";
wget -S -U "Mozilla/5.0" --keep-session-cookies --load-cookies cookies.txt -P $thePath/ -O testDownloadjpg.mp4 "https://salles.allocine.fr/VideoDownloads/DownloadVideo/19583540"

我尝试(但没有真正理解)参数--secure-protocol=auto

我尝试使用参数--http-user=MyUserId --http-password=MyPass,但我认为它适用于使用邮寄表单方法的网站。

我的wget --post-data="Username=MyUserId&Password=MyPass" --keep-session-cookies --save-cookies cookies.txt "https://salles.allocine.fr/Account/LogOn?ReturnUrl=%2fVideoDownloads%2fDownloadVideo%2f19583540%0A" 制作一个名为LogOn?ReturnUrl=%2fVideoDownloads%2fDownloadVideo%2f19583540.1的文件 我认为首先解决这一部分将是一件好事。还是全部! :)

我已经使用提供wget命令的Mozilla插件https://addons.mozilla.org/en-US/firefox/addon/cliget/成功下载了我的视频。不幸的是,这种方法不能再成为一种自动方法。 实际上,在其他PC上,我必须再次使用该插件。 我给您帮助以帮助您::)

wget --header 'Host: salles.allocine.fr' --user-agent 'Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:67.0) Gecko/20100101 Firefox/67.0' --header 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' --header 'Accept-Language: fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3' --header 'Cookie: _ga=GA1.2.1953313605.1547124307; geolevel1=73072; geolevel2=73072; geolevel3=73072; geocode=115755; cto_lwid=74252535-e0d9-4085-a8a9-4dc53e62fcdd; cto_idcpy=ec388dde-ba94-4e78-a629-9bd319ef98a6; _fbp=fb.1.1555088532774.784786208; country_code=FR; geolevel4=73072; geolevel5=73072; geolevel6=73072; geolevel7=73072; geolevel8=73072; geolevel9=73072; geolevel10=73072; geolevel11=73072; geolevel12=73072; geolevel13=83093; geolevel14=83165; nugg=g%3D1%26o%3D2%26i%3D4%26f%3D4%26a%3D3%26l%3D1%26s%3D3%26k%3D2%26m%3D1%26h%3D1%26e%3D4%26fa%3D4%26pc%3D4%26ce%3D4%26ch%3D4%26do%3D4%26da%3D4%26ar%3D4%26em%3D4%26tr%3D4%26ci%3D2%26le%3D0%26ag%3D0%26pf%3D0%26hy%3D0%26uh%3D1%26gp%3D1%26kr%3D1%26tk%3D1%26we%3D1%26rm%3D0%26mi%3D0%26wn%3D1%26sw%3D0%26bi%3D0%26frq%3D1%26cb%3D0%26sa%3D0%26ls%3D1%26he%3D1%26ym%3D0%26lh%3D1%26hm%3D0%26gm%3D0%26ht%3D1%26bc%3D0%26fs%3D0%26cg%3D0%26ds%3D0%26hs%3D1%26yc%3D0%26tg%3D1%26cf%3D1%26dd%3D7%26db%3D5%26ds%3D3%26ex%3D4%26eb%3D6%26ad%3D3%26sb%3D6%26on%3D3%26cke%3D0%26mx%3D0%26asc%3D3%26bxb%3D0%26pdr%3D0%26cos%3D0%26hm_eat%3D1%26hm_afd%3D1%26hm_acimp%3D0%26hm_pmg%3D0%26hm_penv%3D1%26hm_fasl%3D0; _gid=GA1.2.357818189.1559383490; CurrentLanguage=fr; ASP.NET_SessionId=h5gftt5bebgkgakoksnd5moz; .ASPXAUTH=9C3826A4398574BFC23C7D40805AE2EB76DF08F18F3C2DA0C2C96EA806550F5AD9E1376F6C14EB474F4CF764DD02CA835A504A3F4ADFFAE49CDE2114711D8292CB23AF02A7581946CFFA216B9C63FB61BB6F57607835A166ED5EC938096A9C1A92BEC90738E86CF4B01D2D4174F83BCD75A185D1A76C33194D7CF847FC3BDE5C; login=P1001; cUser=168; crypUser=4B5154; CurrentCinema=767' --header 'Upgrade-Insecure-Requests: 1' 'https://salles.allocine.fr/VideoDownloads/DownloadVideo/19582665'  -P $thePath/ -O testDownloadjpg.mp4

0 个答案:

没有答案