I\'d like to download the .crx file of an extension from webstore, I use fiddler to analyze the network request when I install an extension from webstore and got it.
For
To download the chrome extension from a given id, you could just use like this
var currentEXTId = 'bjclhonkhgkidmlkghlkiffhoikhaajg';
let downloadURL = https://clients2.google.com/service/update2/crx?response=redirect&x=id%3D" + currentEXTId + "%26uc&prodversion=32;
The above one is the download URL for the chrome extension. There is also a chrome extension which could help you for downloading chrome extension as zip or crx file.https://chrome.google.com/webstore/detail/crx-extractordownloader/ajkhmmldknmfjnmeedkbkkojgobmljda
Also the code for how its done is available in this Github repo
I wrote a small python script to automate that process what @serg @Rob W
https://gist.github.com/arulrajnet/2424bc1ffc40324f3786
you can use that also.
python ChromeAppDownloader.py -u https://chrome.google.com/webstore/detail/google-maps/lneaknkopdijkpnocmklfnjbeapigfbh
This is how you have to use.
The CRX file itself can be directly downloaded from
https://clients2.google.com/service/update2/crx?response=redirect&prodversion=[PRODVERSION]&acceptformat=crx2,crx3&x=id%3D[EXTENSIONID]%26uc
(New in 2018) acceptformat=crx2,crx3
instructs the server to also respond with extensions in the CRX3 format (instead of 204 No Content when the extension is not available as CRX2).
If the extension you're using contains OS-specific modules (e.g. NaCl), then you have to add additional parameters (os
, arch
, nacl_arch
).
For the full logic of generating a complete CRX download URL, see the get_crx_url
function in https://github.com/Rob--W/crxviewer/blob/master/src/cws_pattern.js.
This is a part of the Chrome Extension Source Viewer extension, available in the Chrome Web Store: https://chrome.google.com/webstore/detail/chrome-extension-source-v/jifpbeccnghkjeaalbbjmodiffmgedin
Note that opening the previous URL in Chrome will not trigger a download because Chrome automatically intercepts responses whose Content-Type
is set to application/x-chrome-extension
. If you want to programatically download the crx file in a Chrome extension, change the MIME-type to application/octet-stream
(e.g. as done in src/lib/crx-to-zip.js).
This is a lower-tech way of doing it than to use fiddler, and I realize this is three years old now, but I always look to see if someone else has solved the problem. So I found someone did, and I just used their solution several times successfully. Their solution is an extension that can download other extensions, called Give Me CRX:
https://chrome.google.com/webstore/detail/give-me-crx/acpimoebmfjpfnbhjgdgiacjfebmmmci
For one of my extensions I had to download other CRXs automatically knowing only extension ID. I solved this by opening the following URL:
http://clients2.google.com/service/update2/crx?response=redirect&x=id%3D<EXTENSION_ID_HERE>%26uc%26lang%3Den-US&prod=chrome
this page will forward you to that https://clients2.googleusercontent.com/crx/download/
address.
I don't remember already how I came up with that URL (it was either in page source somewhere or I used network sniffer), but it has been working great for me since last December, so it looks reliable.
Also, I recommend to try this website http://crxextractor.com. Here you can download an extension by it's Chrome Webstore URL and extract it's source code in the browser, no additional software required, and everything get done in a click or two.