A web scraping tool that automates Google Ads extraction using Selenium and undetected_chromedriver. It searches ads based on keywords and locations, collects ad info, and extracts phone numbers, logging results as CSV files.
The purpose of this GoogleAdsScraper project is to automate the process of
collecting data from Google search results for specific keywords and locations.
It aims to identify ads in search results, extract information such as website
URLs and phone numbers, and store the data in a structured CSV file. The scraper
utilizes undetected Chrome WebDriver to bypass bot detection, employs various
techniques like randomization in scrolling and delays, and handles errors to
maintain stability and consistency in data collection.
Update the keywords and locations lists in the main() function with your search terms. Run the scraper: bash Copy code python google_ads_scraper.py The scraped data will be saved in a timestamped CSV file in the project directory.
- undetected_chromedriver
- Selenium
- Pandas
- fake_useragent
google_ads_scraper.py: Main script containing the scraper class and functions. logs/: Folder to store timestamped logs of each scraping session. results/: Folder to save the output CSV files.