This project is probably a true perfect storm of my being born in 1985. A nice divide between the millennial in me, and the other. To explain, we have to talk about my hobbies. If you’re rather close to me, you already know that I’m busy with many hobbies. I’m a firm believer in a mentality of “You can’t make time for more things, the time is already there – you must utilize it for more thins” approach. This means time can’t be wasted on repetitive things – part of why the blog doesn’t get updated often.
So one of the things Mari and I enjoy doing as a couple is going out to junk yards to find parts for our cars. The truth is, its very rare that you’ll find any kind of built race car out there, but a lot of times we look for things like door or kick panels, a fan motor, turn signal, etc. Something that we could pull ourselves or maybe we hoard up on (cam angle sensors for instance). One of our favorite franchises is Cape Fear Pick and Pull, with 3 locations – Wilmington NC, Fayetteville NC, and Conway SC.
The problem with our favorite chain here is that they have one website for 3 locations, but you cannot search inventory on all 3 locations at once. So, for the DSM, that comes to 9 searches total. Plus the Focus, plus the Rogue, plus the RX7. Plus the mighty max for that damn stroker crank. Wow. Thats a lot of searching. So I said to myself…. you know… `wget` in linux actually downloads webpages, but so does curl. What if… I assembled a paragraph of bash to search each location for each car, greping out the years I wanted. This was a strong case of ‘well one thing led to another and now here we are’.
One of the girls from linuxchix offered some python code to help move me to something more flexible and scriptable. It took weeks to figure out how to manipulate the cookies so that we could look at each location. It took many more weeks for me to figure out how to how to add the ability to search by year with out more bash. So today I merged a dev branch to master in the pnp_scavenger repo that basically does everything I want atm: search location(s) for make model year-range, give me results. The only problems now is that I have I have to run the command once per make/model. Thats okay, in the future I can put that into a SQL table and have it just build the command from the rows in the table. The other issue is…. well I have to run the command… until I figure out how often I want to set it up to email me via chron job.
At the end of the day, this is a great time saver for us. A friend and peer of mine has a script searcking LKQ for his Mighty Max. I’ll be looking to port it over to combine it with my scavenger scripts to expand our potential date areas. Make sure you check it out on github: