Nodes/Download Tools for ComfyUI/Web Image Scraper v0.82
ComfyUI Node

Web Image Scraper v0.82

Scrape a whole website's images without leaving ComfyUI

By EricRollei·Created 9 months ago·Updated 7 months ago· 6
Web Image Scraper v0.82
    • output_path
    • metadata_json_path
    • files_found
    • files_downloaded
    • videos_downloaded
    • duplicates_removed
    • duplicates_moved
    • skipped_small
    • skipped_platform
    • skipped_not_media
    • skipped_already_processed
    • failed_download
    • screenshots_taken
    • stats_summary
    url
    output_dirweb_scraper_output
    min_width512
    min_height512
    max_files1000
    download_imagestrue
    download_videostrue
    same_domain_onlytrue
    filename_prefixWS81_
    use_direct_playwrighttrue
    continue_last_runfalse
    use_url_as_foldertrue
    move_duplicatesfalse
    hash_algorithm
    extract_metadatatrue
    save_metadata_jsontrue
    crawl_linksfalse
    crawl_depth1
    max_pages50
    crawl_subfolderstrue
    skip_first_page_downloadfalse
    link_include_pattern
    link_exclude_pattern
    download_audiofalse
    metadata_export_formatjson
    timeout_seconds100
    handler_timeout120
    max_api_pages3
    wait_for_network_idlefalse
    playwright_wait_ms1000
    use_stealth_modefalse
    stealth_mode_levelbasic
    use_auto_scrolltrue
    max_auto_scrolls150
    scroll_down_times150
    scroll_delay_ms1000
    interaction_sequence
    auth_config_path
    save_cookiesfalse
    take_screenshotfalse
    screenshot_elements
    screenshot_full_pagefalse
    debug_modefalse
    use_paralleltrue
    max_workers4
    reuse_sessionstrue
    session_expiry_hours24
    capture_network_streamfalse
    dump_cache_after_runfalse

    Most ComfyUI nodes make images. This one goes and gets them. The Web Image Scraper (class EricWebFileScraper_v082, part of EricRollei's Download Tools pack) points a real headless browser at a URL, walks the page - pagination, infinite scroll, the whole thing - and dumps the full-resolution images and videos into a folder on your disk. If your workflow is missing a dataset, reference set, or just a pile of references for style, this is the node that fills the gap.

    ComfyUI's whole pitch is that everything is a node and every step is visible. That works great for sampling and miserable for "I need a hundred reference images." The normal answer is a browser, a download-all extension, and a lot of clicking. This node collapses all of that into a single node you drop at the end of the graph and run once.

    How it actually works

    Under the hood it's Playwright driving headless Chromium, with the Scrapling library for the anti-bot and page-parse work. The pack ships 25+ site-specific handlers - Instagram, Reddit, Bluesky, Pinterest, DeviantArt, ArtStation, Flickr, Unsplash, plus a purpose-built handler for IPS/Invision forums that even opens spoiler blocks and walks every page of a topic. Anything without a handler falls through to a generic extractor that grabs every image meeting your size thresholds. Every image gets hashed (perceptual hashing by default) so duplicates are caught even when the same photo appears at different URLs, keeping the largest version. It's genuinely clever for a scraper, and it's the kind of node where "the author clearly scraped a lot of sites" is a compliment.

    The inputs that matter

    You will set maybe five of these. The rest have sane defaults:

    • url - where to start. Multiline, so you can drop several pages.
    • output_dir - where files land; relative paths resolve against ComfyUI's output folder.
    • min_width / min_height - skip anything smaller than this (512px default). This is how you avoid thumbnail spam.
    • download_images / download_videos / download_audio - pick your media types.
    • max_files - a hard cap (1000 default) so you don't accidentally download a whole forum.

    Two worth knowing in the optional tab: use_stealth_mode for sites that fight back, and interaction_sequence, which takes a small JSON list of click / fill / wait_for_selector steps for automating galleries that need a button press. hash_algorithm lets you swap between average_hash, phash, dhash, and whash if dedupe is too aggressive or too loose.

    Wiring the outputs

    This is an output node - it ends the graph, it doesn't feed a sampler. Its output_path (STRING) and metadata_json_path are the two you'd wire into a text/display node if you want the result logged; the rest are count outputs (files_found, files_downloaded, videos_downloaded, duplicates_removed, skipped_small…) plus a stats_summary string. In practice you read the node's own report and go open the folder.

    Installing it

    Via ComfyUI Manager, search "Download Tools" and hit install. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/EricRollei/Download_Tools
    cd Download_Tools && pip install -r requirements.txt
    

    Here's the gotcha Manager won't save you from: Playwright needs its browser binaries, which pip does not install. Run this once against ComfyUI's Python:

    python -m playwright install
    

    Skip that and the node imports fine but can't launch a browser. FFmpeg is optional and only matters if you let it pull video.

    Where it bites

    • Browser won't launch - you skipped playwright install. It's the #1 failure mode.
    • Sites blocking you - turn on use_stealth_mode, or set auth_config_path and save_cookies for login-walled content.
    • Only thumbnails saved - raise min_width/min_height.
    • Duplicates piling up - that's perceptual hashing off; try a different hash_algorithm.

    One more thing to know before you build a commercial pipeline on it: the whole pack is dual-licensed, CC BY-NC 4.0 for non-commercial use, and a paid license for commercial use. Check the LICENSE before you ship anything. Scraping is also legally murky territory in general, and site terms vary - use it on content you're allowed to have.

    Categorydownload-tools/Scrapers

    Inputs (49)

    NameTypeDefaultDescription
    urlSTRING
    output_dirSTRINGweb_scraper_output
    min_widthINT5120–10000
    min_heightINT5120–10000
    max_filesINT10000–5000
    download_imagesBOOLEANtrue
    download_videosBOOLEANtrue
    same_domain_onlyBOOLEANtrue
    filename_prefixSTRINGWS81_
    use_direct_playwrightoptBOOLEANtrue
    continue_last_runoptBOOLEANfalse
    use_url_as_folderoptBOOLEANtrue
    move_duplicatesoptBOOLEANfalse
    hash_algorithmoptCOMBO4 options: average_hash, phash, dhash, whash
    extract_metadataoptBOOLEANtrue
    save_metadata_jsonoptBOOLEANtrue
    crawl_linksoptBOOLEANfalse
    crawl_depthoptINT11–5
    max_pagesoptINT501–500
    crawl_subfoldersoptBOOLEANtrue
    skip_first_page_downloadoptBOOLEANfalse
    link_include_patternoptSTRING
    link_exclude_patternoptSTRING
    download_audiooptBOOLEANfalse
    metadata_export_formatoptCOMBOjson3 options: json, csv, md
    timeout_secondsoptFLOAT1005–600
    handler_timeoutoptFLOAT12010–1200
    max_api_pagesoptINT31–100
    wait_for_network_idleoptBOOLEANfalse
    playwright_wait_msoptINT10000–60000
    use_stealth_modeoptBOOLEANfalse
    stealth_mode_leveloptCOMBObasic3 options: basic, enhanced, extreme
    use_auto_scrolloptBOOLEANtrue
    max_auto_scrollsoptINT1500–500
    scroll_down_timesoptINT1500–200
    scroll_delay_msoptINT100050–5000
    interaction_sequenceoptSTRING
    auth_config_pathoptSTRING
    save_cookiesoptBOOLEANfalse
    take_screenshotoptBOOLEANfalse
    screenshot_elementsoptSTRING
    screenshot_full_pageoptBOOLEANfalse
    debug_modeoptBOOLEANfalse
    use_paralleloptBOOLEANtrue
    max_workersoptINT41–16
    reuse_sessionsoptBOOLEANtrue
    session_expiry_hoursoptFLOAT241–720
    capture_network_streamoptBOOLEANfalse
    dump_cache_after_runoptBOOLEANfalse

    Outputs (14)

    NameTypeDescription
    output_pathSTRING
    metadata_json_pathSTRING
    files_foundINT
    files_downloadedINT
    videos_downloadedINT
    duplicates_removedINT
    duplicates_movedINT
    skipped_smallINT
    skipped_platformINT
    skipped_not_mediaINT
    skipped_already_processedINT
    failed_downloadINT
    screenshots_takenINT
    stats_summarySTRING