How nikolait/googlescraper works
GoogleScraper is a Python search-engine results scraper. A user supplies keywords, engines, search type, and mode through the CLI or library; core configures the run and dispatches scraping, which obtains and parses result pages, persists SERPs, and writes JSON/CSV or stdout. It supports blocking HTTP, Selenium, asynchronous HTTP, caching, and proxies. Edges reflect the excerpts, SOURCE INDEX references, or README; connections for unsampled implementation details are omitted.
Main entry points: core.py Run coordinator · scraping.py Scrape lifecycle · http_mode.py HTTP mode · selenium_mode.py Selenium mode
Components 21
Entry and configuration
- Command line
GoogleScraper/commandline.py - Config loader
GoogleScraper/config.py - Default settings
GoogleScraper/scrape_config.py - Run coordinator
GoogleScraper/core.py - Scrape jobs
GoogleScraper/scrape_jobs.py
Scrape execution
- Scrape lifecycle
GoogleScraper/scraping.py - HTTP mode
GoogleScraper/http_mode.py - Async HTTP
GoogleScraper/async_mode.py - Selenium mode
GoogleScraper/selenium_mode.py
Results and storage
- SERP parsing
GoogleScraper/parsing.py - SERP database
GoogleScraper/database.py - Output converter
GoogleScraper/output_converter.py - Response cache
GoogleScraper/caching.py
Network support
- Proxy management
GoogleScraper/proxies.py - User agents
GoogleScraper/user_agents.py - SOCKS support
GoogleScraper/socks.py
Other components
- User
- Search engines
- Browser drivers
- Cache files
- JSON or CSV
Connections 30
- User → Command line: sets options
README.md - Command line → Run coordinator: starts run
GoogleScraper/core.py - Run coordinator → Command line: reads arguments
GoogleScraper/core.py - Run coordinator → Config loader: loads settings
GoogleScraper/core.py - Config loader → Default settings: overrides defaults
GoogleScraper/config.py - Run coordinator → Scrape jobs: builds jobs
GoogleScraper/core.py - Run coordinator → Scrape lifecycle: dispatches scraping
GoogleScraper/core.py - Run coordinator → HTTP mode: selects mode
GoogleScraper/core.py - Run coordinator → Selenium mode: selects mode
GoogleScraper/core.py - Run coordinator → Async HTTP: selects mode
GoogleScraper/core.py - Scrape lifecycle → HTTP mode: runs HTTP
GoogleScraper/scraping.py - Scrape lifecycle → Selenium mode: runs browser
GoogleScraper/scraping.py - HTTP mode → SERP parsing: parses response
GoogleScraper/http_mode.py - Async HTTP → SERP parsing: parses response
GoogleScraper/async_mode.py - Selenium mode → User agents: sets user agent
GoogleScraper/selenium_mode.py - HTTP mode → User agents: uses user agents
GoogleScraper/http_mode.py - HTTP mode → SOCKS support: wraps sockets
GoogleScraper/http_mode.py - Scrape lifecycle → Proxy management: selects proxies
GoogleScraper/scraping.py - Run coordinator → Proxy management: loads proxies
GoogleScraper/core.py - Search engines → HTTP mode: serves searches
- Search engines → Browser drivers: serves searches
- Browser drivers → Selenium mode: drives browser
- Scrape lifecycle → SERP database: stores SERPs
GoogleScraper/scraping.py - Scrape lifecycle → Output converter: stores results
GoogleScraper/scraping.py - SERP parsing → SERP database: populates results
GoogleScraper/parsing.py - Output converter → SERP database: reads SERPs
GoogleScraper/output_converter.py - Run coordinator → Response cache: manages cache
GoogleScraper/core.py - Response cache → Cache files: reads and writes
GoogleScraper/caching.py - Response cache → SERP database: records cached jobs
GoogleScraper/caching.py - Output converter → JSON or CSV: writes output
GoogleScraper/output_converter.py