image-scraper
/image-scraper
Pobiera wszystkie obrazy z podanego adresu URL: wyodrębnia adresy obrazów ze strony i je zapisuje, głównie przez python3 i curl, z awaryjną automatyzacją przeglądarki.
- Autor
- aAAaqwq ↗
- Repozytorium
- AGI-Super-Team ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 20.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 2
- Skrypty
- 1
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 1
Brak sygnałów. Repozytorium zmienione 20.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
- 1 skrypt w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.
Skrypty: scripts/scrape.py
Co robi i kiedy
Pobiera wszystkie obrazy z podanego adresu URL: wyodrębnia adresy obrazów ze strony i je zapisuje, głównie przez python3 i curl, z awaryjną automatyzacją przeglądarki.
Oryginalny opis (EN)
Scrape and download all images from a given URL. Takes a URL, extracts image URLs from the page, and downloads them. Uses python3/curl as primary method, falls back to browser automation if needed. Use when user provides a URL and wants to download images from that page.
Jak działa
- Method 1: Python3 (Primary - Zero Dependency)
- Method 2: Curl + Grep (Minimal)
- Method 3: Browser Automation (Fallback)
- Decision Flow
- Output
- Notes
Podgląd SKILL.md
---
name: image-scraper
description: Scrape and download all images from a given URL. Takes a URL, extracts image URLs from the page, and downloads them. Uses python3/curl as primary method, falls back to browser automation if needed. Use when user provides a URL and wants to download images from that page.
---
# Image Scraper
Scrape all images from a given URL and download them locally.
## Method 1: Python3 (Primary - Zero Dependency)
```python
#!/usr/bin/env python3
"""Download all images from a URL."""
import sys
import os
import re
import urllib.request
import urllib.error
from html.parser import HTMLParser
class ImageParser(HTMLParser):
def __init__(self):
super().__init__()
self.images = []
def handle_starttag(self, tag, attrs):
if tag == 'img':
for attr, val in attrs:
if attr == 'src' and val:
self.images.append(val)
if tag == 'source':
for attr, val in attrs:
if attr == 'src' and val:
self.images.append(val)
def scrape_images(url, output_dir="images"):
os.makedirs(output_dir, exist_ok=True)
req = urllib.request.Request(url, headers={'User-Agent': 'Mozilla/5.0'})
with urllib.request.urlopen(req, timeout=15) as resp:
html = resp.read().decode('utf-8', errors='ignore')
parser = ImageParser()
parser.feed(html)
# Deduplicate and filter
seen = set()
urls = []
for img in parser.images:
if img.startswith('//'):
img = 'https:' + img
if img.startswith('http') and img not in seen:
seen.add(img)
urls.append(img)
print(f"Found {len(urls)} images")
for i, img_url in enumerate(urls):
try:
ext = os.path.splitext(img_url.split('?')[0])[1] or '.jpg'
fname = f"{output_dir}/img_{i:03d}{ext}"
urllib.request.urlretrieve(img_url, fname)
print(f" [{i+1}] {fname}")
except Exception as e:
print(f" [{i+1}] FAILED: {e}")
return urls
if __name__ == "__main__":
url = sys.argv[1] if len(sys.argv) > 1 else input("URL: ")
scrape_images(url)
```
**Usage:**
```bash
python3 /path/to/image-scraper.py "https://example.com/article"
```
## Method 2: Curl + Grep (Minimal)
```bash
# Extract image URLs and download
curl -sL "URL" | grep -oP 'https?://[^"]+\.(jpg|jpeg|png|webp|gif)' | sort -u | head -20 | while read url; do
curl -sL "$url" -o "images/$(echo $url | md5sum | cut -d' ' -f1).${url##*.}"
done
```
## Method 3: Browser Automation (Fallback)
Use OpenClaw's browser tool when the page is JavaScript-rendered or Method 1 fails.
```bash
# 1. Open page in browser
browser(action=open, url="URL")
# 2. Get page content and extract images via JavaScript
browser(action=act, targetId="TAB_ID", request={
"kind": "evaluate",
"fn": "() => Array.from(document.querySelectorAll('img')).map(img => img.src)"
})
# 3. Download each image with curl
```
## Decision Flow
1. **Try Method 1** (python3) first — handles most static pages
2. **If 403/blocked**: Try adding headers (`Referer`, `Accept`)
3. **If JS-rendered or paywalled**: Use Method 3 (browser)
4. **Always** print the downloaded file paths
## Output
- Images saved to `./images/` by default
- Named `img_000.jpg`, `img_001.png`, etc.
- Report: "Downloaded N images to images/"
## Notes
- Only downloads images from the given URL, not full site
- Filters out tracking pixels and tiny icons (width/height < 50px optionally)
- Respects robots.txt implicitly (no enforcement)
- For Twitter/X: browser method may be needed due to JS rendering
Pliki w paczce (2)
- SKILL.md 4 KB
- scripts/scrape.py 3 KB
Wersje
W bazie nie ma innych skilli o nazwie image-scraper.
Migawka bazy z 13.11.2026 · wersja paczki 00380cc7cd45 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100google-image-search-results-and-metadata-scraper
Wyszukuje obrazy Google i zwraca pełnowymiarowe adresy URL, wymiary, miniatury i strony źródłowe jako wiersze JSON. - 100gallery-scraper
Pobiera hurtowo obrazy z galerii chronionych logowaniem przez dołączoną sesję przeglądarki, w tym pełnowymiarowe z miniatur i wielostronicowe. - 90web-scraper
Pobiera zawartość dowolnej strony pod podanym adresem URL i zwraca ją jako czysty Markdown. - 90scrape
Pobiera przez przeglądarkę dane i media ze wskazanego adresu URL i zapisuje lokalnie zasoby wraz z manifestem, bez zmieniania strony. - 87scraper-studio
Buduje i uruchamia scrapery Bright Data generowane przez AI z terminala poleceniami bdata scraper create i run: z opisu w języku naturalnym, dla jednego adresu URL lub partii adresów. - 100apify-yandex-image-search-api
Wyszukuje obrazy w Yandex Images i zwraca adresy pełnowymiarowych obrazów jako ustrukturyzowany JSON przez Apify Actor, z filtrami typu, koloru, rozmiaru i świeżości.