Recover assets (images, videos, data) that weren't directly archived by Wayback Machine
by crawling archived pages that reference them. Use when: (1) Direct asset URL returns
404/503 from Wayback, (2) Asset was hosted on CDN that Wayback didn't crawl, (3) You
have the page URL but not the asset URL, (4) Recovering avatars, thumbnails, or embedded
media from defunct services. The key insight: pages often got archived even when their
assets didn't - extract URLs from archived HTML, then try alternative fetch methods.
Recover assets (images, videos, data) that weren't directly archived by Wayback Machine
by crawling archived pages that reference them. Use when: (1) Direct asset URL returns
404/503 from Wayback, (2) Asset was hosted on CDN that Wayback didn't crawl, (3) You
have the page URL but not the asset URL, (4) Recovering avatars, thumbnails, or embedded
media from defunct services. The key insight: pages often got archived even when their
assets didn't - extract URLs from archived HTML, then try alternative fetch methods.
author
Claude Code
version
1.0.0
date
"2026-01-28T00:00:00.000Z"
Wayback Indirect Asset Recovery
Problem
When archiving content from defunct services, direct asset URLs (images, videos, avatars)
often return 404/503 from Wayback Machine even when the pages referencing them were archived.
The assets themselves may not have been crawled, but their URLs exist in archived HTML.
Context / Trigger Conditions
Direct Wayback URL for asset returns 404 or 503
You have a profile/page URL but not the asset URL
Recovering media from defunct services (Vine, Tumblr, defunct startups)
Wayback has the page but not the embedded assets
CDN-hosted assets that weren't in Wayback's crawl scope
# Try multiple patterns - pages structure varies
patterns = [
# Open Graph image
(r'og:image["\s]+content="([^"]+)"', 'og:image'),
# JSON data in page
(r'"avatarUrl"\s*:\s*"([^"]+)"', 'JSON avatarUrl'),
(r'"imageUrl"\s*:\s*"([^"]+)"', 'JSON imageUrl'),
# CDN URLs
(r'(https?://[^"\s]+cdn\.[^"\s]+\.(jpg|png|mp4))', 'CDN URL'),
# S3 URLs
(r'(https?://[^"\s]+\.s3\.amazonaws\.com/[^"\s]+)', 'S3 URL'),
]
for pattern, name in patterns:
match = re.search(pattern, html)
ifmatch:
asset_url = match.group(1).replace('&', '&')
break
Step 3: Handle Wayback-Wrapped URLs
URLs extracted from archived pages are often already Wayback URLs:
# If URL is already wrapped, convert im_ to id_ for raw contentif'web.archive.org/web/'in asset_url:
# Replace /web/TIMESTAMP/ or /web/TIMESTAMPim_/ with /web/TIMESTAMPid_/
download_url = re.sub(r'/web/(\d+)(im_)?/', r'/web/\1id_/', asset_url)
else:
# Wrap raw URL in Wayback
download_url = f"https://web.archive.org/web/{timestamp}id_/{asset_url}"
Step 4: Fallback Methods if Wayback Fails
If Wayback returns 404/503 for the asset, try alternatives:
# Extract original CDN URL
cdn_match = re.search(r'(https?://[^/]+cdn\.[^"\s]+)', asset_url)
if cdn_match:
original_url = cdn_match.group(1)
# Method 1: Try live CDN via IP (if DNS is dead but servers live)# See: dead-cdn-dns-bypass skill# Method 2: Try different Wayback timestampsfor ts in ['20170110', '20160601', '20150601']:
alt_url = f"https://web.archive.org/web/{ts}id_/{original_url}"
resp = session.get(alt_url, timeout=30)
if resp.status_code == 200:
break# Method 3: Check if asset exists on successor platform# (e.g., user migrated to Twitter/TikTok with same username)