Commit Graph
11 Commits
Author SHA1 Message Date
asepharyana 7850b5fa03 feat: add Dailymotion + Reddit downloader endpoints via yt-dlp
Deploy Scraper / build-and-deploy (push) Canceled after 0s
New platforms from Shirokami-style downloadter set:
- /download/dailymotion: real MP4/HLS streams (288p up to 2160p)
- /download/reddit: real v.redd.it HLS media for public posts
- detect + all-in-one dispatch updated

Both verified working from VPS with real URLs.
2026-09-01 18:05:35 +07:00
asepharyana 4dee99cc43 feat: Spotify via oEmbed+ytsearch, Pinterest via pinterest-dl CLI scraping
Deploy Scraper / build-and-deploy (push) Canceled after 0s
Spotify (was returning DRM metadata stub):
- Resolve track title via Spotify oEmbed API (no auth, works from VPS)
- Search YouTube Music via yt-dlp ytsearch: -> return real audio stream URL
- Provider: spotify-oembed+ytsearch

Pinterest (was returning 'No download URLs found'):
- Replace dead pinterestdownloader.io API with pinterest-dl CLI scraping
- pinterest-dl handles guest-token/cookie dance, returns real media for
  public pins: HLS video stream (v1.pinimg.com/videos/*.m3u8) + poster image
- Provider: pinterest-dl, with Playwright fallback retained

Both verified live: Spotify returns real googlevideo audio URL (itag=251,
3.4MB); Pinterest returns real v1.pinimg.com HLS streams (200 verified).
2026-09-01 17:14:38 +07:00
asepharyana 6b3fad1ad4 feat: Pinterest Playwright fallback + Spotify graceful DRM message
Deploy Scraper / build-and-deploy (push) Canceled after 0s
- fetch_pinterest: pinterestdownloader.io API failures now non-fatal, fall
  through to Playwright scraping (captures v.pinimg.com video URLs); returns
  graceful 200 'No download URLs found' instead of 502 on dead API.
- fetch_spotify: catch yt-dlp DRM error and return 200 with track metadata +
  clear message (direct audio needs Spotify Premium). No more raw 502.
2026-09-01 16:36:36 +07:00
asepharyana 563bce5211 fix: Twitter/X via Syndication API returns real MP4s (twitter-syndication provider)
Deploy Scraper / build-and-deploy (push) Canceled after 0s
Use cargo tokenless https://cdn.syndication.twimg.com/tweet-result?id={id}&token=0
which returns tweet JSON with video variants (MP4 at multiple bitrates).
Works server-side with no auth, wired as primary before savetwitter/yt-dlp.
2026-09-01 16:22:43 +07:00
asepharyana 134fde4ac2 fix: TikTok via embed-page scraping returns real MP4 (tiktok-embed provider)
Deploy Scraper / build-and-deploy (push) Canceled after 0s
Scrape https://www.tiktok.com/embed/v2/{id} HTML and extract the direct
v16m.tiktokcdn.com MP4 from the <video data-testid=play-video> tag.
Works server-side (no auth) while main site/API are Cloudflare-blocked.
Verimplemented before tikwm/yt-dlp/Playwright fallbacks.
2026-09-01 16:17:26 +07:00
asepharyana 4684a6a75c fix: make scrape_media.py path resolution robust + include it in Nix build
Deploy Scraper / build-and-deploy (push) Canceled after 0s
- Nix flake now installs scrape_media.py to $out/bin so CI deploys it with the binary
- run_playwright_scraper locates the script alongside the running binary (Nix store),
  the Cargo manifest dir (dev), /home/code/scraper, or $SCRAPER_SCRIPT_DIR
- Fix var_os() Option match
2026-09-01 15:40:57 +07:00
asepharyana 4c5dfdb156 feat: add Playwright browser scraping fallback for Instagram/Facebook/Twitter
Deploy Scraper / build-and-deploy (push) Canceled after 0s
- Add scrape_media.py using Playwright+Chromium to bypass Cloudflare/anti-bot
- Add run_playwright_scraper() Rust helper (spawns Python, probes venv)
- Add playwright_to_download_result() JSON->DownloadResult converter
- Instagram/Facebook: try downr.org, fall back to Playwright (returns real cdninstagram/fbcdn URLs)
- Twitter: scope scraper::Html/Selector parsing in a block so the future stays Send, then Playwright fallback
- Revert --impersonate chrome (unsupported on Linux) to --user-agent
- Install Chromium browsers to /usr/local/share/ms-playwright for all users
2026-09-01 15:35:20 +07:00
asepharyana dd490535fc fix: integrate yt-dlp for Bilibili/SoundCloud/TikTok fallbacks; fix Bilibili BV ID regex; fix stdout pipe buffer truncation (Stdio::piped); fix duplicate comment lines
Deploy Scraper / build-and-deploy (push) Canceled after 0s
2026-09-01 13:47:36 +07:00
asepharyana fb33b67a29 fix: replace dead YouTube APIs with yt-dlp subprocess; fix all JSON panic crashes; add yt-dlp fallback for TikTok/Bilibili/SoundCloud; fix Bilibili BV ID regex; fix stdout pipe buffer truncation (Stdio::piped)
Deploy Scraper / build-and-deploy (push) Canceled after 0s
2026-09-01 13:34:47 +07:00
asepharyana a41425a887 fix: replace dead YouTube APIs with yt-dlp subprocess; fix all JSON panic crashes; add yt-dlp helper functions
Deploy Scraper / build-and-deploy (push) Canceled after 0s
- YouTube MP3/MP4: replaced dead savetube.media + ytdlpyton.nvlgroup.my.id with yt-dlp subprocess
- Added find_ytdlp() + run_ytdlp_json() helpers with spawn_blocking for >64KB stdout
- Fixed all resp['key'] -> resp.get('key') panics in Twitter, Spotify, KrakenFiles, Danbooru
- Removed dead fetch_youtube_v2_mp3/mp4 + decrypt_savetube functions
- ScraperError::Http -> AppError::ScraperError -> HTTP 502 instead of 500
- All endpoints now return graceful 502 with error message instead of crashing 500

Tested with real URLs:
- YouTube MP3: 200, success, real audio URL extracted
- YouTube MP4: 200, success, 48 format URLs extracted
- TikTok: 200 (tikwm provider)
- MediaFire: 200 (success)
2026-09-01 12:51:52 +07:00
asepharyana 763a641593 feat(downloader): add 26 downloader APIs + detect endpoint
Deploy Scraper / build-and-deploy (push) Canceled after 0s
Port downloaders from Shirokami-API (Node.js):
- Instagram/Facebook (snapsave.app, downr.org fallback)
- TikTok (tikwm.com)
- YouTube MP4/MP3 (savetube.media, ydlp.yard.id)
- Spotify, Twitter/X (api.lrm.tube)
- Bilibili, Pinterest, MediaFire, Mega, TeraBox
- PixelDrain, Threads, DoodStream, KrakenFiles
- Danbooru, SoundCloud, Google Drive

Domain layer: DownloadResult + MediaItem entities
Application layer: 7 use-cases + detect_platform auto-detect
Infrastructure: DownloaderRepository (22 fetch functions)
Presentation: 21 handlers + DTO + OpenAPI schemas

Also: upgrade OpenTelemetry to 0.28 (axum 0.7 conflict resolution)
2026-09-01 00:54:06 +07:00