RSS

Car shopping with .bat

26 May

I’ve been test driving some cars and seriously looking for new ones. We stopped at a Ford dealer but wasn’t really impressed with the Fusion. After that, I drove a couple VW Jettas and it was a great ride. AutoTrader.com has a great search tool but what really got the attention of my local dealership sales person was when I showed him the price for a similar Jetta that was quite a bit cheaper and had less miles from an actual dealership. Salespeople aren’t too impressed with results from AutoTrader so I was looking for cars on a dealers lot.

What most car manufactures do is create a template website with inventory search capabilities. Then each dealership has an easy task of making their own site from that template. I get a map with all the dealerships in america when I go to: http://dealers.vw.com/dcc/dealerSearch.html

I was clicking each dealership and opening it in a new tab and checking prices. After doing this and realizing how inefficient it was I started putting my web development experience to good use. It was painfully easy to recognize all of my search parameters were in the address bar.

http://www.bettenvolkswagen.com/VehicleSearchResults?pageContext=VehicleSearch&search=preowned&search=certified&bodyType=All&make=Volkswagen&model=Jetta+Sedan&trim=All&minPrice=-2147483648&maxPrice=17000&minYear=2008&maxYear=2010&minMileage=-2147483648&maxMileage=30000&minMPG=-2147483648&maxMPG=2147483647

Problem was each dealer had its own domain name. Also, the HTML that came back would be difficult to parse. With a .bat file I could start each page with my HTTP search params. So I collected all of the dealerships I was interested in and lined up the commands.

start "vw1" "http://www.bettenvolkswagen.com/VehicleSearchResults?pageContext=VehicleSearch&search=preowned&search=certified&bodyType=All&make=Volkswagen&model=Jetta+Sedan&trim=All&minPrice=-2147483648&maxPrice=17000&minYear=2008&maxYear=2010&minMileage=-2147483648&maxMileage=30000&minMPG=-2147483648&maxMPG=2147483647"
start "vw2" "http://www.maplehillvw.com/VehicleSearchResults?pageContext=VehicleSearch&search=preowned&search=certified&bodyType=All&make=Volkswagen&model=Jetta+Sedan&trim=All&minPrice=-2147483648&maxPrice=17000&minYear=2008&maxYear=2010&minMileage=-2147483648&maxMileage=30000&minMPG=-2147483648&maxMPG=2147483647"
start "vw5" "http://www.vyletelvw.com/VehicleSearchResults?pageContext=VehicleSearch&search=preowned&search=certified&bodyType=All&make=Volkswagen&model=Jetta+Sedan&trim=All&minPrice=-2147483648&maxPrice=17000&minYear=2008&maxYear=2010&minMileage=-2147483648&maxMileage=30000&minMPG=-2147483648&maxMPG=2147483647"

The first attempt failed because chrome couldn’t keep up so I added a quick ping in between each command.

start "vw1" "http://www.bettenvolkswagen.com/VehicleSearchResults?pageContext=VehicleSearch&search=preowned&search=certified&bodyType=All&make=Volkswagen&model=Jetta+Sedan&trim=All&minPrice=-2147483648&maxPrice=17000&minYear=2008&maxYear=2010&minMileage=-2147483648&maxMileage=30000&minMPG=-2147483648&maxMPG=2147483647"
ping 127.0.0.1 -n 1
start "vw2" "http://www.maplehillvw.com/VehicleSearchResults?pageContext=VehicleSearch&search=preowned&search=certified&bodyType=All&make=Volkswagen&model=Jetta+Sedan&trim=All&minPrice=-2147483648&maxPrice=17000&minYear=2008&maxYear=2010&minMileage=-2147483648&maxMileage=30000&minMPG=-2147483648&maxMPG=2147483647"
ping 127.0.0.1 -n 1
start "vw3" "http://www.williamsvolkswagen.com/VehicleSearchResults?pageContext=VehicleSearch&search=preowned&search=certified&bodyType=All&make=Volkswagen&model=Jetta+Sedan&trim=All&minPrice=-2147483648&maxPrice=17000&minYear=2008&maxYear=2010&minMileage=-2147483648&maxMileage=30000&minMPG=-2147483648&maxMPG=2147483647"
ping 127.0.0.1 -n 1
start "vw4" "http://www.fox.vwdealer.com/VehicleSearchResults?pageContext=VehicleSearch&search=preowned&search=certified&bodyType=All&make=Volkswagen&model=Jetta+Sedan&trim=All&minPrice=-2147483648&maxPrice=17000&minYear=2008&maxYear=2010&minMileage=-2147483648&maxMileage=30000&minMPG=-2147483648&maxMPG=2147483647"

What I end up with is chrome open with tabs of all the cars I am interested in. I’d like to parse the HTML and save the results so I can be notified of changes, but that would take too long (lazy).

Advertisements
 
Leave a comment

Posted by on May 26, 2011 in Uncategorized

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: