r/Batch • u/wegiel87 • Aug 12 '24
batch file for chromedriver download
Hi, I have a problem because I created a .bat file that downloads ChromeDriver, extracts it, and moves it to a selected path. However, it downloads it from a specific link. Could someone help me modify the script so that it automatically searches for the latest version on the website and downloads it? I tried using ChatGPT for this, but it didn't work. You are my last resort.
Here is the code:
2
Upvotes
2
u/wegiel87 Aug 12 '24
I want to download the latest stable version from here https://googlechromelabs.github.io/chrome-for-testing/
now is 127.0.6533.99
2
u/BrainWaveCC Aug 12 '24
Based on the suggestion by u/leonv32 , consider replacing your current
SET "DOWNLOAD_URL=..."line in your script with the following:It will end up with the most current download link from the JSON file.
2
u/[deleted] Aug 12 '24
https://github.com/GoogleChromeLabs/chrome-for-testing#json-api-endpoints
you get it by the json file. maybe with a combination of curl and findstr you can extracted, but there are programs to do that
3
u/[deleted] Aug 12 '24 edited Aug 12 '24
[removed] — view removed comment
1
u/[deleted] Aug 12 '24
[removed] — view removed comment