import requests import os VIDEO_URL = "https://www.w3schools.com/html/mov_bbb.mp4" OUTPUT_DIR = r"C:\Users\ALC\.openclaw\media\videos" OUTPUT_PATH = os.path.join(OUTPUT_DIR, "mov_bbb.mp4") os.makedirs(OUTPUT_DIR, exist_ok=True) print("Downloading video from w3schools...") r = requests.get(VIDEO_URL, stream=True, timeout=60) size = int(r.headers.get('content-length', 0)) size_kb = size / 1024 print(f"Size: {size_kb:.2f} KB") with open(OUTPUT_PATH, 'wb') as f: for chunk in r.iter_content(chunk_size=8192): f.write(chunk) print(f"Downloaded: {OUTPUT_PATH}") print(f"Size: {size_kb:.2f} KB")