Author: Victoria

  • API Scraping

    API scraping is collecting data from an HTTP API instead of extracting it from a page’s rendered HTML. A crawler sends a request to an endpoint and parses the response, often JSON, into records. The term is informal: some people use it for documented APIs, while others mean requests a website’s own frontend makes to retrieve data.

    The Request and Response Workflow

    The basic workflow is to identify the endpoint, reproduce the request your use is authorized to make, and turn the response into the fields your task needs. A request may include a method, query parameters, headers, or an access token. Responses may contain pagination links or cursors, so retrieving one page is not always enough.

    For a page that loads data dynamically, browser developer tools can show which requests the page makes. That can help explain the data flow, but it does not grant permission to use a private endpoint. Check the API documentation, access terms, and required authentication before collecting data.

    API Endpoints and HTML Parsing

    Use an official API when it provides the fields you need and your use is allowed. API responses are often easier to parse than page markup, and changes to layout may not affect them. HTML scraping may be necessary when no suitable API is available or the required information appears only in the page.

    An API is not automatically stable or unrestricted. It may require credentials, impose quotas, omit fields shown on the page, or change its schema. An endpoint used internally by a site may also lack public documentation or support.

    Checks Before Collecting API Data

    • Confirm that the endpoint and intended use are permitted.
    • Read the API documentation and authentication requirements.
    • Handle pagination, rate limits, errors, and retries deliberately.
    • Check the response status and content type before parsing JSON.
    • Validate field names and types; a successful HTTP response can still contain an error object or unexpected data.
    • Store only the fields needed for the task, with source and collection time when useful.

    API scraping is most useful when a permitted endpoint returns the data in a structured form. The practical work is often less about parsing and more about understanding access rules, pagination, and response behavior.

    Sources

  • Headless Browser

    A headless browser runs a browser engine without displaying a normal graphical window. It can load pages, execute JavaScript, and expose the resulting DOM to automation code, which is useful for testing and for collection tasks that genuinely depend on browser rendering.

    When to use one

    First check whether the needed data is already present in the HTML or a documented endpoint. A direct HTTP request is often simpler and faster. Use a headless browser when content appears only after client-side execution or when the task requires a browser interaction that you are authorized to perform.

    Headless does not mean stateless or identical to every visible browser. Rendering can depend on viewport, locale, cookies, fonts, and timing. Wait for a page-specific condition rather than a fixed sleep, and keep browser versions consistent when reproducing a result.

    Browsers consume more resources than basic HTTP clients. Limit concurrency, close pages when done, and handle timeouts explicitly. A browser also does not bypass a site’s access rules.

    Sources

  • Git Bash

    Git Bash is a command-line environment for Windows that provides Git plus a collection of Unix-style shell tools. It lets developers use familiar commands such as ls, grep, and shell scripts alongside Git without switching to a Linux machine.

    Where it fits

    Git Bash is useful when a project documents commands for Bash or when a small script needs common Unix utilities. It is not the same thing as Git itself: Git is the version control program, while Git Bash provides a shell environment in which Git and other commands can run.

    Windows paths and shell syntax can differ from PowerShell or Command Prompt. A command that uses environment variable syntax, quoting, or path separators in Bash may need adjustment in another shell. If a team shares setup instructions, state which shell they assume.

    For crawler work, Git Bash can run repository commands and simple scripts. For longer or platform-specific automation, choose the shell and runtime that match the project and document the expected environment.

    Sources

  • ETL (Extract, Transform, Load)

    ETL stands for extract, transform, load: a data workflow that pulls information from one or more sources, reshapes or cleans it, then writes it to a destination. In a scraping project, extraction may collect page fields, transformation may normalize dates and remove duplicates, and loading may store records in a database or file.

    Keep each stage traceable

    Preserve enough source information to tell what the transformation changed. For example, retain the original price string as well as a parsed numeric value and currency. Validate records before loading, and route failures somewhere visible instead of silently dropping them.

    ETL is often contrasted with ELT, where raw data is loaded first and transformed in the destination system. Either can work. Choose based on data volume, destination capabilities, and whether the raw source needs to remain available for reprocessing.

    Retries deserve attention: loading the same batch twice should not accidentally duplicate all rows. Use stable keys or idempotent upserts where appropriate, and record batch identifiers and run times.

    Sources

  • Fingerprint

    A fingerprint is a compact value derived from data so a system can compare or identify it later. In crawling, fingerprints are commonly made from URLs or page content to detect repeats and changes. The exact method depends on what “the same” should mean for the task.

    Pick the input carefully

    A URL fingerprint may use a normalized URL: lowercase the hostname, remove a fragment, and handle known tracking parameters. A content fingerprint may hash selected fields after normalization. These two fingerprints answer different questions—whether the crawler has seen an address, and whether the content appears unchanged.

    Cryptographic hashes are useful for exact matching but do not recognize near-duplicates. Small input changes produce different values. For similarity, use a technique designed for approximate comparison and be prepared for false matches.

    Store the normalization rule or version with the fingerprint. Otherwise a later change to URL cleanup or text extraction can make old and new values look inconsistent. Do not treat a fingerprint as a reversible encoding; it cannot recreate the original data.

    Sources

  • cURL

    cURL is a command-line tool for transferring data with URLs and a library that applications can use for the same purpose. It is handy when checking whether an endpoint responds, reproducing a request outside a browser, or saving a response for inspection.

    A small debugging workflow

    Start with a simple request and ask for response headers:

    curl -i https://example.com/

    The status line and headers help separate an HTTP response from a DNS, TLS, or connection failure. Add options one at a time when reproducing a request, and keep secrets out of command history and shared logs. A browser request may depend on cookies, JavaScript, or authentication that a basic cURL command does not include.

    cURL does not render a page or execute its JavaScript. If the response is an HTML shell with content loaded later, inspect the network calls or use a browser automation tool when permitted. For repeated collection, add timeouts and a sensible request rate rather than running an unbounded loop.

    Sources

  • Challenge Page

    A challenge page is an HTML screen shown before a site serves the page or resource a visitor requested. It gives the site’s security system a chance to evaluate the request or ask for an additional check. The screen may be a full-page interstitial, a browser-based check, or a more visible interaction.

    How It Affects a Crawl

    For a crawler expecting JSON, an image, or an article, a challenge page can look like a successful HTTP response while containing the wrong content. Check the response body and content type as well as the status code. Cloudflare challenge responses, for example, use the cf-mitigated: challenge header; that header is specific to Cloudflare and should not be assumed for other providers.

    Challenge pages can interrupt API and fetch requests because the client receives HTML instead of the expected data. If you encounter one, stop treating the response as the target record. Review the site’s access policy and use an authorized route or contact the site owner. Repeatedly retrying or disguising a crawler does not resolve the access decision.

    Challenge Page vs. CAPTCHA

    A challenge page describes how the check is delivered: often as an interstitial page. CAPTCHA describes one kind of human-verification test. A challenge page may run a non-interactive check, show a CAPTCHA, or use another verification method.

    Sources

  • Crawler Fingerprinting

    Crawler fingerprinting is the identification of automated traffic from signals in requests and behavior. A site may consider user-agent strings, request headers, connection properties, timing, and repeated navigation patterns. No single signal reliably identifies every crawler.

    Why it matters

    Site operators use these signals to understand traffic, apply rate limits, and distinguish expected crawlers from unusual automation. A user-agent label is easy to claim, so operators may verify the source through additional evidence such as published IP ranges or request behavior. False positives are possible: accessibility tools, monitoring clients, and unusual browsers can resemble automation.

    For people building crawlers, the practical takeaway is to identify the client honestly, send only necessary headers, follow published rules, and keep traffic within reasonable limits. Changing fingerprints to evade a site’s controls is not a substitute for permission and may violate its terms.

    Fingerprinting can be probabilistic. Treat classification as a signal with uncertainty, not proof of a person’s identity or intent. Avoid retaining more connection data than needed for the stated operational purpose.

    Sources

  • CAPTCHA (Completely Automated Public Turing test to tell Computers and Humans Apart)

    A CAPTCHA is a check a website uses to assess whether a visitor is likely human or automated. Older versions commonly asked people to read distorted text; newer systems may use a checkbox, an interaction, or background risk analysis. Some checks do not show a puzzle at all.

    Where It Appears

    Sites may use CAPTCHA-style checks around sign-up, login, forms, checkout, or traffic that looks unusual. Google reCAPTCHA, for example, includes versions that present a challenge and a version that returns a risk score for the site to evaluate. A CAPTCHA is one signal in an access decision, not a guarantee that a person is safe or a bot is harmful.

    What It Means for a Crawl

    If a request receives a CAPTCHA or challenge page instead of the expected content, record that as a restricted or challenged response. It is not a parsing failure, and retrying the same request repeatedly is unlikely to produce useful data. Check the site’s published access options or ask for an approved API or permission. Do not try to defeat the check.

    CAPTCHAs can also exclude people who have accessibility needs, older devices, or limited network access. Site owners should consider whether the check is necessary and provide a usable alternative where possible.

    Sources