This project is a Python-based Airbnb scraper that allows you to extract listing information without using the official Airbnb API. The scraper retrieves key details from each listing, such as location, price, review count, and more.
- Property data extraction: Retrieves information like location, price, property type, review count, and availability.
- Handles multiple requests: Implements techniques to avoid being blocked, such as user-agent rotation and proxy handling.
- Optimized speed: Efficient scraping, obtaining up to 100 data points every 2 minutes without being banned.
- Headless execution: Runs in headless mode, enabling execution on servers without a graphical interface.
- CSV export: Saves extracted data to a CSV file for easy analysis and manipulation.
- Python 3.x
- Selenium
- BeautifulSoup
- Pandas
- A compatible web browser (Chrome or Firefox) and its respective driver (ChromeDriver or GeckoDriver)
-
Clone this repository to your local machine:
git clone https://github.com/Norjuelas/ScrappingHouses.git
-
Navigate to the project directory:
cd ScrappingHouses
-
Install the project dependencies:
pip install -r requirements.txt
-
Download the browser driver (ChromeDriver or GeckoDriver) and ensure it is in your system’s PATH or place it in the project directory.
-
Edit the
config.yaml
file to set the search parameters you want (location, price range, etc.). -
Run the scraping script:
python airbnb_scraper.py
-
The results will be saved in a CSV file named
airbnb_listings.csv
in the project directory.
In the config.yaml
file, you can customize the following parameters:
- Location: Define the city or region where you want to scrape.
- Price range: Set a minimum and maximum price range.
- Number of results: Set how many properties you want to fetch per search.
location: "Bogotá"
min_price: 50
max_price: 300
results_limit: 100
#File Structure -[airbnb_scraper.py:] The main script that performs the scraping. -[config.yaml]: Configuration file where you define the search parameters. -[requirements.txt]: A list of dependencies required to run the project. -[airbnb_listings.csv]: The output file containing the scraped property listings.
#Contributions Contributions are welcome! If you’d like to contribute, please open an issue or a pull request in the repository.
#License This project is licensed under the MIT License.