$ show thatonecodes/examtopics-downloader
This is a Go CLI tool that scrapes certification exam questions and answers from the examtopics.com website, which is otherwise paywalled or requires manual browsing. The tool accepts a provider (e.g., google, cisco) and a search string to filter exams, then fetches all discussion pages, extracts question data (text, choices, community-voted answer, timestamp, comments), and outputs the results in Markdown, JSON, HTML, PDF, or plain text. It includes optional caching via a GitHub repository of pre-scraped data, rate limiting, retry logic, and concurrent request concurrency. The architecture is a single-binary monolith with internal packages for fetching, scraping, and file output. The code is functional but unremarkableβstandard Go patterns with some concurrency, though the global counter and finalizer usage are minor anti-patterns.
The LLM identified 1 files worth highlighting for reuse:
Implements the core scraping logic with a concurrent worker pool (semaphore pattern), rate limiting via a time.Ticker, and a progress bar (pb library). The `fetchAllPageLinksConcurrently` and `GetAllPages` functions demonstrate a reusable pattern for scraping a paginated website with controlled concurrency, retries, and deduplication. This component could be extracted into a generic concurrent web scraper utility with minimal changes, as it isolates the HTTP client, rate limiting, and result collection.