← All Learning Paths

Web Scraping Engineer

Build resilient scrapers: HTML parsing libraries, browser automation, polite request handling, and replaying traffic to debug extraction failures.

roleintermediate13 nodes16.17h total

Path overview

构建稳健的抓取器:HTML 解析库、浏览器自动化、礼貌请求处理,以及回放流量以调试提取失败。

Build resilient scrapers: HTML parsing libraries, browser automation, polite request handling, and replaying traffic to debug extraction failures.

  1. Read "Beautiful Soup"'s documented surface around "BeautifulSoup BeautifulSoup(markup, parser): BeautifulSoup", then build a minimal endpoint and log the response.

    Completion criteria: Run a request against "Beautiful Soup", paste the response, and add one deliberately invalid call with its error.

    Next step: Cheerio

    ⏱ 1h

  2. Stand up "Cheerio" for a web scraping engineer task, confirm "cheerio.load cheerio.load(html: string | Buffer, options?: { xml?: boolean }): CheerioAPI" holds, and document one failure you triggered.

    Prerequisites: Beautiful Soup

    Completion criteria: Attach one successful call and one invalid call against "Cheerio", citing "cheerio.load cheerio.load(html: string | Buffer, options?: { xml?: boolean }): CheerioAPI" as the documented surface.

    Next step: goquery

    ⏱ 1h

  3. Wire "goquery" into a scratch web scraping engineer project, following "goquery.NewDocumentFromReader goquery.NewDocumentFromReader(r)", and record one working request/response pair.

    Prerequisites: Cheerio

    Completion criteria: Run a request against "goquery", paste the response, and add one deliberately invalid call with its error.

    Next step: Colly

    ⏱ 1h

  4. Read "Colly"'s documented surface around "colly.NewCollector colly.NewCollector(options...)", then build a minimal endpoint and log the response.

    Prerequisites: goquery

    Completion criteria: Attach one successful call and one invalid call against "Colly", citing "colly.NewCollector colly.NewCollector(options...)" as the documented surface.

    Next step: Scrapy

    ⏱ 1h

  5. Stand up "Scrapy" for a web scraping engineer task, confirm "scrapy.Spider class MySpider(scrapy.Spider): name; start_urls" holds, and document one failure you triggered.

    Prerequisites: Colly

    Completion criteria: Run a request against "Scrapy", paste the response, and add one deliberately invalid call with its error.

    Next step: Selenium

    ⏱ 1h

  6. Wire "Selenium" into a scratch web scraping engineer project, following "WebDriverWait / find_element WebDriverWait(driver,", and record one working request/response pair.

    Prerequisites: Scrapy

    Completion criteria: Attach one successful call and one invalid call against "Selenium", citing "WebDriverWait / find_element WebDriverWait(driver," as the documented surface.

    Next step: Requests

    ⏱ 1h

  7. Read "Requests"'s documented surface around "requests.get requests.get(url, params=None, **kwargs): Response", then build a minimal endpoint and log the response.

    Prerequisites: Selenium

    Completion criteria: Run a request against "Requests", paste the response, and add one deliberately invalid call with its error.

    Next step: httpx

    ⏱ 1h

  8. Stand up "httpx" for a web scraping engineer task, confirm "httpx.get httpx.get(url, **kwargs): Response" holds, and document one failure you triggered.

    Prerequisites: Requests

    Completion criteria: Attach one successful call and one invalid call against "httpx", citing "httpx.get httpx.get(url, **kwargs): Response" as the documented surface.

    Next step: Cheerio HTML Metadata Extraction

    ⏱ 1h

  9. Run the web scraping engineer snippet "Cheerio HTML Metadata Extraction", capture stdout, and show which line demonstrates the documented behavior: "Parse fetched HTML with Cheerio to extract OpenGraph metadata, clean text, and attribute".

    Prerequisites: httpx

    Completion criteria: Save two runs of "Cheerio HTML Metadata Extraction" side by side — the original input and one changed value — and annotate the line where the output diverges.

    Next step: FastAPI Async Web Scraper Pipeline

    ⏱ 0.75h

  10. Read "FastAPI Async Web Scraper Pipeline" as an architecture drill: for each Python, FastAPI, Celery, Redis component, state what it owns and what it delegates.

    Prerequisites: Cheerio HTML Metadata Extraction

    Completion criteria: Attach the component-to-responsibility table for Python, FastAPI, Celery, Redis and annotate one trade-off with evidence from "Async httpx client with connection pooling instead of blocking requests".

    Next step: Record and Replay HTTP Traffic with mitmproxy

    ⏱ 1.5h

  11. Run "Record production-like traffic, save it as a flow file, and replay it against a test" from "Record and Replay HTTP Traffic with mitmproxy" and confirm the documented result "A flow file is written and each request prints a one-line summary as it passes through.".

    Completion criteria: Deliver a transcript of "Record and Replay HTTP Traffic with mitmproxy" with each step's command and observed state, ending at "Record production-like traffic, save it as a flow file, and replay it against a test".

    Next step: Extract Allowlisted Links from HTML

    ⏱ 0.5h

  12. Turn JSON object: { html: string, allowedHosts: string[] } into {links:[{href:https://docs.example.com/start,text:Start}],skipped:1} by completing "Extract Allowlisted Links from HTML" with a reproducible script and a failing-case note.

    Prerequisites: Record and Replay HTTP Traffic with mitmproxy

    Completion criteria: Submit a solution for "Web Scraping Engineer" that passes both samples ({html:<a href=\https://docs.example.com/start\>Start</a><a to {links:[{href:https://docs.example.com/start,text:Start}],sk) and attach the failing case you fixed.

    Next step: Capstone: Web Scraping Engineer

    ⏱ 0.42h

  13. Build "Build a URL Metadata Scraper Service" through its phases, keeping "Safe fetch" independently testable.

    Prerequisites: Record and Replay HTTP Traffic with mitmproxy, Extract Allowlisted Links from HTML

    Completion criteria: Run the project's test command for "Build a URL Metadata Scraper Service", paste the passing output, and attach the acceptance note for "Safe fetch" with the test name.

    Next step: Run the capstone's tests, publish the repository, and demo it to a reviewer.

    ⏱ 4h