scitex_web.download_images
- scitex_web.download_images(url, output_dir=None, min_size=None, max_workers=5, same_domain=False)[source]
Download images from a URL.
- Parameters:
url (
str) – Webpage URL or direct image URLoutput_dir (
Optional[str]) – Output directory (default: $SCITEX_DIR/web/downloads)min_size (
Optional[Tuple[int,int]]) – Minimum (width, height) to filter small images (default: 400x300)max_workers (
int) – Concurrent download threadssame_domain (
bool) – Only download images from the same domain
- Return type:
- Returns:
List of downloaded file paths
Example
>>> paths = download_images("https://example.com") >>> paths = download_images("https://example.com/photo.jpg") >>> paths = download_images("https://example.com", min_size=(800, 600))