/depto_scraper

Scrape apartments from websites searches and upload them in a google spreadsheet

Primary LanguagePython

This is a script for scraping apartments for rent from different websites and put them in a google docs spreadsheet. It takes a search url as a parameter and upload the new apartments (compared with previous runs) to the spreadsheet.

The code may be a bit messy and with some spanglish words ("depto" means apartment) but some people asked me to see the code so here it is.

It uses the following libraries:
Beautiful Soup 4
mechanize
gspread

For using it, first you need to have a google docs spreadsheet like this, then set your google account info in config.py. Then you only need to pass a search url as a parameter to scrap.py, for example:
python scrap.py http://propiedades.zonaprop.com.ar/alquiler-departamentos-4-amb/ncZ1_tdZtipo-departamento-otro_opZtipo-operacion-alquiler_caZcantidad-ambientes-4_agZ1+3_formatZlist_soZempdesc

The current version only supports two argentinian websites, www.argenprop.com and zonaprop.com.ar, but it can be easily modified to support other websites.