google-chromegoogle-chrome-extensiondownloadchrome-web-store

How to download a CRX file from the Chrome web store for a given ID?


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 example, for the extension: https://chrome.google.com/webstore/detail/bjclhonkhgkidmlkghlkiffhoikhaajg
the download link is:

https://clients2.googleusercontent.com/crx/download/OgAAADQ_Loe5gfVPF2OUaB35tvex-NKlmA8V4K5YlWuvLCknMH7egLLmnMoFuCZePl_idE1GMf8jZC2KbjQqyyLDoDAAxlKa5eDp-z9frOppHWtQsRU3-iGrrrrA/extension_1_7_11.crx
Now I'm wondering if there is a universal method for get .crx of an extension, the problem is how did Google encryption

bjclhonkhgkidmlkghlkiffhoikhaajg

into

OgAAADQ_Loe5gfVPF2OUaB35tvex-NKlmA8V4K5YlWuvLCknMH7egLLmnMoFuCZePl_idE1GMf8jZC2KbjQqyyLDoDAAxlKa5eDp-z9frOppHWtQsRU3-iGrrrrA ?

any idea will be helpful.


Solution

  • 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.