curl 下载最新的firefox版本脚本

o2rvlv0m  于 2022-11-13  发布在  其他
关注(0)|答案(3)|浏览(317)

我如何通过命令行下载最新版本的firefox并插入脚本
我试过wget https://download.mozilla.org/?product=firefox-38.0.1-SSL&os=linux64&lang=en-US
我从https://www.mozilla.org/en-US/firefox/new/的下载按钮复制了链接位置
但是这个wget命令只是生成了一个无用的index.html?product=firefox-38.0.1-SSL文件,很可能是因为没有转义字符,但是无论如何,这个命令都被限制为静态38版本,而不是通用的
wget http://wordpress.org/latest.tar.gz
或通过curl -O https://wordpress.org/latest.tar.gzcurl连接
或者这是不可能的,因为firefox没有提供最新的tar链接?有什么有效的解决办法吗?
我也使用apt-get install firefox,但是apt存储库似乎没有包含最新的firefox。

fruv7luv

fruv7luv1#

将wget与--content-disposition键一起使用,并将链接括在引号中。
示例:

wget --content-disposition "https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64&lang=en-US"

这里需要双引号来转义URL中的特殊字符&。否则,我们将丢失URL中的参数。

2nbm6dog

2nbm6dog2#

您可以尝试以下代码:

wget --recursive --no-parent --no-host-directories --cut-dirs=6 --accept bz2 https://download-installer.cdn.mozilla.net/pub/firefox/releases/latest/linux-x86_64/en-US/
trnvg8h3

trnvg8h33#

顶级域名注册商:
您https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=en-US!
old Mozilla FTP directory上,它包含了一个关于如何使用wget下载的说明。我已经在下面包含了它:

Please use download.mozilla.org to retrieve the latest Firefox release. 

For example, if you wish to download the US English installer for Windows (32bit)
the url is
   https://download.mozilla.org/?product=firefox-latest&os=win&lang=en-US

This could be pasted into the location bar of a browser, or used with curl or wget,  e.g. 
wget -O FirefoxSetup.exe "https://download.mozilla.org/?product=firefox-latest&os=win&lang=en-US"

For other operating systems replace 'os=win' with:
   Windows 64bit              os=win64
   OS X                       os=osx
   Linux x86_64               os=linux64
   Linux i686                 os=linux

For other languages replace 'lang=en-US' with:
   Acholi                     lang=ach
   Afrikaans                  lang=af
   Albanian                   lang=sq
   Arabic                     lang=ar
   Aragonese                  lang=an
   Armenian                   lang=hy-AM
   Assamese                   lang=as
   Asturian                   lang=ast
   Azerbaijani                lang=az
   Basque                     lang=eu
   Belarusian                 lang=be
   Bengali (Bangladesh)       lang=bn-BD
   Bengali (India)            lang=bn-IN
   Bosnian                    lang=bs
   Breton                     lang=br
   Bulgarian                  lang=bg
   Catalan                    lang=ca
   Chinese (Simplified)       lang=zh-CN
   Chinese (Traditional)      lang=zh-TW
   Croatian                   lang=hr
   Czech                      lang=cs
   Danish                     lang=da
   Dutch                      lang=nl
   English (British)          lang=en-GB
   English (South African)    lang=en-ZA
   Esperanto                  lang=eo
   Estonian                   lang=et
   Finnish                    lang=fi
   French                     lang=fr
   Frisian                    lang=fy-NL
   Fulah                      lang=ff
   Gaelic (Scotland)          lang=gd
   Galician                   lang=gl
   German                     lang=de
   Greek                      lang=el
   Gujarati (India)           lang=gu-IN
   Hebrew                     lang=he
   Hindi (India)              lang=hi-IN
   Hungarian                  lang=hu
   Icelandic                  lang=is
   Indonesian                 lang=id
   Irish                      lang=ga-IE
   Italian                    lang=it
   Kannada                    lang=kn
   Kazakh                     lang=kk
   Khmer                      lang=km
   Korean                     lang=ko
   Latvian                    lang=lv
   Ligurian                   lang=lij
   Lithuanian                 lang=lt
   Lower Sorbian              lang=dsb
   Macedonian                 lang=mk
   Maithili                   lang=mai
   Malay                      lang=ms
   Malayalam                  lang=ml
   Marathi                    lang=mr
   Norwegian (Bokmål)        lang=nb-NO
   Norwegian (Nynorsk)        lang=nn-NO
   Oriya                      lang=or
   Persian                    lang=fa
   Polish                     lang=pl
   Portuguese (Brazilian)     lang=pt-BR
   Portuguese (Portugal)      lang=pt-PT
   Punjabi (India)            lang=pa-IN
   Romanian                   lang=ro
   Romansh                    lang=rm
   Russian                    lang=ru
   Serbian                    lang=sr
   Sinhala                    lang=si
   Slovak                     lang=sk
   Slovenian                  lang=sl
   Songhai                    lang=son
   Spanish (Argentina)        lang=es-AR
   Spanish (Chile)            lang=es-CL
   Spanish (Mexico)           lang=es-MX
   Spanish (Spain)            lang=es-ES
   Swedish                    lang=sv-SE
   Tamil                      lang=ta
   Telugu                     lang=te
   Thai                       lang=th
   Turkish                    lang=tr
   Ukrainian                  lang=uk
   Upper Sorbian              lang=hsb
   Uzbek                      lang=uz
   Vietnamese                 lang=vi
   Welsh                      lang=cy
   Xhosa                      lang=xh

Mozilla Release Engineering
Email: release-engineering@lists.mozilla.org
Web:   https://groups.google.com/forum/#!forum/mozilla.release.engineering
``

相关问题