- First Name
- Alex
- Joined
- Jul 23, 2020
- Threads
- 1
- Messages
- 22
- Reaction score
- 105
- Location
- Amarillo Texas
- Vehicle(s)
- 2012 Ram 1500
- Your Bronco Model
- Wildtrak
- Thread starter
- #1
Okay folks, I don't know if I have any fellow Linux geeks out there, but I wrote this script in order to notify me when the build page goes live so I thought I would share.
Geeky part...
My Logic: I looked at the Ford webpage for existing vehicles (F150, Escape, etc...) and looked at the structure of the URL
F150
https://shop.ford.com/build/f150/#/chooseyourpath/
Escape
https://shop.ford.com/build/escape/#/chooseyourpath/
In Linux, if you 'curl' any of these URL's you get a 200 HTTP Status Code "Success"
However, if you curl the presumed URL the Bronco will sit at (https://shop.ford.com/build/bronco/#/chooseyourpath/), you get a 301 "Redirect" to the generic showroom.
So my script looks for the expected Bronco URL (https://shop.ford.com/build/bronco/#/chooseyourpath/) every 20 minutes. As long as it gets a 301 HTTP status code, it does nothing. But as soon as it gets a 200 status code, it will make an audible notification every second and output the URL which was successful. I tested this with the F150 and Escape and it appears to work as intended.
Again, this only works on Linux but all you have to do is take the attached file, change the extension from .txt to .sh (Would not let me upload as .sh), make sure it has executable permissions (chmod +x bronco.sh) and then execute it (./bronco.sh)
Geeky part...
My Logic: I looked at the Ford webpage for existing vehicles (F150, Escape, etc...) and looked at the structure of the URL
F150
https://shop.ford.com/build/f150/#/chooseyourpath/
Escape
https://shop.ford.com/build/escape/#/chooseyourpath/
In Linux, if you 'curl' any of these URL's you get a 200 HTTP Status Code "Success"
However, if you curl the presumed URL the Bronco will sit at (https://shop.ford.com/build/bronco/#/chooseyourpath/), you get a 301 "Redirect" to the generic showroom.
So my script looks for the expected Bronco URL (https://shop.ford.com/build/bronco/#/chooseyourpath/) every 20 minutes. As long as it gets a 301 HTTP status code, it does nothing. But as soon as it gets a 200 status code, it will make an audible notification every second and output the URL which was successful. I tested this with the F150 and Escape and it appears to work as intended.
Again, this only works on Linux but all you have to do is take the attached file, change the extension from .txt to .sh (Would not let me upload as .sh), make sure it has executable permissions (chmod +x bronco.sh) and then execute it (./bronco.sh)
Sponsored
Attachments
-
705 bytes Views: 265