I’m rewriting my Craigslist search tool both to improve it for my own needs, and to improve it for the needs of law enforcement in tracking down stolen property. As a part of that development, I wrote a quick tool which automatically browses all of the Craigslist “geo” pages, which list the separate sites for the different ISO 3166-1 Alpha-2 country codes around the world. It then parses them all (taking into account 404 pages for countries without sites, 302 pages for countries with a single default city, and countries that contain numerous sites) and outputs a comma separated file in the following format:
"CountryCode","CountryName","CityName","CityURL"
"AE","United Arab Emirates","Default","https://dubai.craigslist.org"
"AR","Argentina","Default","https://buenosaires.craigslist.org"
"AT","Austria","Default","https://vienna.craigslist.at"
"AU","Australia","Adelaide","https://adelaide.craigslist.com.au/"
"AU","Australia","Brisbane","https://brisbane.craigslist.com.au/"
"AU","Australia","Cairns","https://cairns.craigslist.com.au/"
...and so on.
As you can see this can easily be imported into database or spreadsheet software, as well as your own creations. As of today, there are 706 sites in all. Here are the downloads for you if you want them:
- MakeCityList.exe – The win32 executable, which should be run from the command line. It will also run under WINE in Linux.
- CLcitylist.csv – This is the data file generated by the program, listing all the different Craigslist sites as of November 2nd, 2009.
Hope this is helpful to someone. I’ll release the new version of the search tool itself in a week or two most likely. It already has some major improvements (and is a top-to-bottom rewrite) over the old one, but if anyone has wish features, now is the time to tell me. I’m happy to share source code — if you want it, just email me — although I suspect anyone who’d be interested in the source code could write this tool in the time it would take me to reply to your email!
2 Comments
Thanks for the work needed to post this! I’m generating the file as we speak, I’m writing a free search tool for Android as the ones available are horrible.
Thanks!
Kenny.
Kenny, feel free to use anything from the source code of my craigslist, kijiji, etc search tools if it’s helpful to you. If I haven’t posted the most recent source code, remind me to and I will.
Post a Comment