본문으로 건너뛰기
cccskills
무료GitHub에 공개

wayback-indirect-asset-recovery

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.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구X (Twitter)AWS

실행 점수 미검증

설치 방법 보기

포함된 파일(1)

  • SKILL.md6.0 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

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

Solution

Step 1: Fetch the Archived Page

import requests
import re

session = requests.Session()
session.headers['User-Agent'] = 'YourCrawler/0.1 (archival research)'

# Fetch archived profile/page
page_url = f"https://web.archive.org/web/20170110/https://example.com/user/{username}"
resp = session.get(page_url, timeout=20, allow_redirects=True)

Step 2: Extract Asset URLs from HTML

# 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)
    if match:
        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 content
if '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 timestamps
    for 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)

Verification

  1. Check HTTP 200 response from final download URL
  2. Validate content-type matches expected type
  3. Verify file magic bytes (JPEG: \xff\xd8\xff, PNG: \x89PNG)
  4. Confirm file size > minimum threshold

Example: Recovering Vine Avatars

def recover_avatar_from_profile(vanity_url: str, user_id: str, session) -> bool:
    """Recover avatar by crawling archived Vine profile."""
    timestamps = ['20170110', '20161201', '20160601', '20150601']

    for ts in timestamps:
        # Fetch archived profile page
        profile_url = f"https://web.archive.org/web/{ts}/https://vine.co/{vanity_url}"
        resp = session.get(profile_url, timeout=20)

        if resp.status_code != 200:
            continue

        # Extract avatar URL from page
        match = re.search(r'og:image["\s]+content="([^"]+)"', resp.text)
        if not match:
            match = re.search(r'"avatarUrl"\s*:\s*"([^"]+)"', resp.text)

        if match:
            avatar_url = match.group(1).replace('&', '&')

            # Convert to raw content URL
            if 'web.archive.org/web/' in avatar_url:
                download_url = re.sub(r'/web/(\d+)(im_)?/', r'/web/\1id_/', avatar_url)
            else:
                download_url = f"https://web.archive.org/web/{ts}id_/{avatar_url}"

            # Download
            img_resp = session.get(download_url, timeout=30)
            if img_resp.status_code == 200 and len(img_resp.content) > 100:
                # Validate and save
                if img_resp.content[:3] == b'\xff\xd8\xff':  # JPEG
                    save_avatar(user_id, img_resp.content, 'jpg')
                    return True

    return False

Result: Recovered avatars for 95% of top Vine creators (including Logan Paul, Nash Grier, Lele Pons) whose direct avatar URLs weren't archived.

Notes

  • Wayback im_ vs id_ modifiers: im_ returns image with Wayback toolbar, id_ returns raw bytes
  • Rate limiting: Respect Wayback's servers - add 1-2 second delays between requests
  • Multiple timestamps: Try several archive dates - some may have the asset, others may not
  • HTML entity decoding: Always decode & to & in extracted URLs
  • Redirect handling: Use allow_redirects=True - Wayback often redirects to nearest snapshot

Related Skills

  • dead-cdn-dns-bypass - For when CDN DNS is dead but servers still respond
  • wayback-api-archive-recovery - For discovering what was archived via CDX API
  • wayback-machine-raw-content-id-modifier - For fetching raw content without Wayback wrapper

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Fix ArgoCD ExternalSecret deployment failing with "namespace X is not permitted in project Y". Use when: (1) ExternalSecret shows OutOfSync in ArgoCD but won't sync, (2) ArgoCD application status shows "namespace X is not permitted in project 'infrastructure'", (3) ExternalSecret targets a namespace managed by a different ArgoCD project, (4) Using apps-of-apps pattern with separate infrastructure and application projects.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

divinevideo/divine-mobile2642026년 10월 24일 업데이트

Art direction for any content — reads text, PDF, Word, HTML, PPT, then proposes 2-3 creative directions with photography style, mood, and visual language. After selection, generates AI image prompts and visual briefs section-by-section. Use when the user shares content and needs visual direction, image sourcing, or creative direction for any material.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

divinevideo/divine-mobile2642026년 10월 24일 업데이트

Fix "Null check operator used on a null value" errors when an object is set to null during an async await. Use when: (1) Object reference is nullified while awaiting, (2) Code accesses object with ! after await returns, (3) Cancel/dispose operations run concurrently with async operations on same object. Solution: capture local reference before await.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

divinevideo/divine-mobile2642026년 10월 24일 업데이트

Add custom metadata headers (x-amz-meta-*) to AWS v4 signed requests for GCS S3-compatible API. Use when: (1) Adding custom metadata to GCS uploads via S3 API, (2) Getting signature mismatch errors after adding new headers, (3) x-amz-meta-* headers being ignored or causing 403 errors. Custom headers MUST be included in canonical headers and signed headers list.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

divinevideo/divine-mobile2642026년 10월 24일 업데이트

Fix password/secret authentication failures caused by trailing newlines when creating Google Cloud secrets (or similar) with bash here-strings. Use when: (1) Password authentication fails with correct password, (2) Secret created with `<<< "value"` syntax, (3) Error like "password authentication failed" or "invalid token" despite correct value. Bash here-strings (`<<<`) add a trailing newline that corrupts secrets.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

divinevideo/divine-mobile2642026년 10월 24일 업데이트

Fix silent video/media processing failures caused by URL extraction code that filters on file extensions (.mp4, .webm, .webp). Use when: (1) Media moderation, transcoding, or analysis silently skips files from Blossom or content-addressed storage servers, (2) URL extraction from Nostr event tags (imeta, r tags) drops URLs without recognized extensions, (3) CDN fallback URLs append .mp4 but the actual server uses extensionless content-addressed paths like /{sha256}. Common in Nostr video events (kind 34236) where different clients use different URL formats.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

divinevideo/divine-mobile2642026년 10월 24일 업데이트

divinevideo의 스킬 모두 보기

이 스킬의 문제 신고