agivx3 Posted August 17, 2023 Share Posted August 17, 2023 Hi out there ! i am trying to read the version number of the actual chrome stable release from a website and keep failing due to less html knowledge. Maybe someone can help me please. The website is https://chromiumdash.appspot.com/releases?platform=Windows I tried something like this in several versions. But without any solution.... Local $sURL = "https://chromiumdash.appspot.com/releases?platform=Windows" Local $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") $oHTTP.Open("GET", $sURL) $oHTTP.Send() $sHTMLBIN = $oHTTP.Responsetext Local $sHTML = BinaryToString($sHTMLBIN) Alternately the version is also visible on this site: https://chromeenterprise.google/intl/de_de/browser/download/#windows-tab But i didn't get it from there either. Any solutions welcome 🙂 Link to comment Share on other sites More sharing options...
Alecsis1 Posted August 17, 2023 Share Posted August 17, 2023 (edited) Hi! There's no need to do Local $sHTML = BinaryToString($sHTMLBIN) Your $sHTMLBIN is already a text string 🙂 Edited August 17, 2023 by Alecsis1 Link to comment Share on other sites More sharing options...
agivx3 Posted August 17, 2023 Author Share Posted August 17, 2023 Ah ok, thx. Never tried without. But the response text does nevertheless not include the version number i want to read. Any idea about this? Link to comment Share on other sites More sharing options...
Alecsis1 Posted August 17, 2023 Share Posted August 17, 2023 (edited) Too many sites like this generate versions and URLs via scripts. Sad but true 😠 For example try this direcy link to .zip archive https://download-chromium.appspot.com/dl/Win Edited August 17, 2023 by Alecsis1 argumentum 1 Link to comment Share on other sites More sharing options...
Musashi Posted August 17, 2023 Share Posted August 17, 2023 2 hours ago, agivx3 said: Any solutions welcome This should do the job : #include <String.au3> Local $sNETSource = BinaryToString(InetRead("https://chromiumdash.appspot.com/fetch_releases?channel=Stable&platform=Windows&num=1", 2)) Local $aLatestStableVersion = _StringBetween($sNETSource, ',"version":"', '"}]') ConsoleWrite($aLatestStableVersion[0] & @CRLF) "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." Link to comment Share on other sites More sharing options...
Danp2 Posted August 17, 2023 Share Posted August 17, 2023 An alternative would be to use one of the JSON Endpoints that were recently added as part of the Chrome For Testing initiative. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Gianni Posted August 17, 2023 Share Posted August 17, 2023 #include <array.au3> Local $aCromiumVersions[][] = _ [['Windows:',BinaryToString(InetRead("https://omahaproxy.appspot.com/win"))], _ ['Linux:',BinaryToString(InetRead("https://omahaproxy.appspot.com/linux"))], _ ['Mac:',BinaryToString(InetRead("https://omahaproxy.appspot.com/mac"))]] _ArrayDisplay($aCromiumVersions,'stable version') source: https://stackoverflow.com/questions/35114642/get-latest-release-version-number-for-chrome-browser Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
Gianni Posted August 17, 2023 Share Posted August 17, 2023 if you need some more info on the chromium versions... #include <array.au3> _ArrayDisplay(_StringSplit2D(StringStripWS(BinaryToString(InetRead("https://omahaproxy.appspot.com/all", 1)), 2), @LF, ',')) Func _StringSplit2D($var, $sRowSeparator = @LF, $sColumnSeparator = ',') Local $aRows = StringSplit($var, $sRowSeparator), $aColumns, $aResult[$aRows[0]][0] For $iRow = 1 To $aRows[0] $aColumns = StringSplit($aRows[$iRow], $sColumnSeparator) If $aColumns[0] > UBound($aResult, 2) Then ReDim $aResult[$aRows[0]][$aColumns[0]] EndIf For $iColumn = 1 To $aColumns[0] $aResult[$iRow - 1][$iColumn - 1] = $aColumns[$iColumn] Next Next Return $aResult EndFunc ;==>_StringSplit2D Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
agivx3 Posted August 17, 2023 Author Share Posted August 17, 2023 That looks very good. Thx a lot 🙂 for all solutions. I assume that appspot.com is no official site from Google but it seems to be up to date. Hopefully it will exist for longer so that i can use it. Link to comment Share on other sites More sharing options...
argumentum Posted August 17, 2023 Share Posted August 17, 2023 32 minutes ago, agivx3 said: but it seems to be up to date use https://versionhistory.googleapis.com/v1/chrome/platforms/win64/channels/stable/versions/all/releases?filter=endtime=none Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now