mozdownload is a node.js / coffeescript server to make it easier to download Firefox without knowing the version number associated with a given channel.
The parser is largely based on mozilla/mozdownload which is a python CLI tool.
- Push it to heroku
- npm install && PORT=8080 node boot.js
http://mozdownload/firefox/{lang}/{platform}/{type}/{channel}
Where:
-
lang is a language that Mozilla build for (see latest mac for a sample list). Note: for nightly builds typically only en-US will be available.
-
platform is the OS/architechture. Valid values at time of writing are
linux
,linux64
,mac
, andwin32
.mac64
andwin64
may become available later. -
type is
release
ornightly
-
channel will depend on type:
-
for
release
, typical values arelatest
(the current stable release) orbeta
(the latest beta). Additionaly other folder names found in the releases may work. -
for
nightly
, typical values aretrunk
(the latest nightly) ormozilla-aurora
(the latest aurora). Other folder names (starting with latest in nightly may work.
-
http://mozdownload/firefox/{lang}/{platform}/{type}/{channel}/redirect
Will do a 302 redirect to the download URL
http://mozdownload/firefox/{lang}/{platform}/{type}/{channel}/version
The body will simply be the version string (not enclosed in JSON).
You could improve this app by taking advantage of libs/product-details which could reducing the scraping required.
Please consider changing the user-agent sent to Mozilla in directory_parser.coffee.