简体   繁体   中英

Get latest release version number for chrome browser

I am trying to figure out a rather stable way to programmatically determine the latest release version number of the chrome browser.

  • <\/li>
  • <\/li>
  • <\/li><\/ul>

    So I ended up fetching git files.


    From there on the solution is just a preg_match_all away ... Unfortunately its not the latest release version but the latest dev version.

    Still makes sense in my case. On the other hand its solely for display purposes. Nothing is going to depend on it later on – promise :-)

The Chrome team uses the OmahaProxy dashboard to keep track of current versions in stable/beta/dev/canary. If you can scrape that you can get whatever version number you're looking for.

Feel free to use my online service vergrabber to get latest versions of different kind of software in json format. It's available at http://vergrabber.kingu.pl/vergrabber.json

I've found the following endpoints from OmahaProxy that give the latest stable versions of the respective OS.

If you're on debian based linux, you could install and update your chrome once a day, and somehow parse the version number, but this is not realtime.

For example:

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
dpkg -i google-chrome-stable_current_amd64.deb

Which will give a log like this:

(Reading database ... 113338 files and directories currently installed.)
Preparing to unpack google-chrome-stable_current_amd64.deb ...
Unpacking google-chrome-stable (48.0.2564.97-1) over (47.0.2526.111-1) ...
Setting up google-chrome-stable (48.0.2564.97-1) ...
Processing triggers for menu (2.1.47) ...

Then just parse it.

The ChromiumDash also makes the data available via an API. You can use that to fetch the latest tag for a platform and a channel.

[
  {
    "channel": "Stable", 
    "chromium_main_branch_position": 950365, 
    "hashes": {
      "angle": "343b7bb57268e1cb47da26fcb0ed40fe47e8ff5d", 
      "chromium": "cab11adacc41ee856c79e669c2fd38d8864e52c4", 
      "dawn": "1b1b658d365591b6a8d4bfb0c3524832c89afc99", 
      "devtools": "b6f648d8921ea8be8f2b32c2061fec7503b56610", 
      "pdfium": "27cabf3dae38d0634a53316da0ad069bf0413495", 
      "skia": "a6986cd7224f104044fd5bc29cb5f80796d76f5a", 
      "v8": "db77a493a5595b835655b243202ac0c2fb1898a6", 
      "webrtc": "a6b138d6b4ef3a5b2c87f899b67f3b5c8dd3c002"
    }, 
    "milestone": 98, 
    "platform": "Windows", 
    "previous_version": "98.0.4758.81", 
    "time": 1643754840000, 
    "version": "98.0.4758.82"
  }
]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM