feat: wire videy + tiktok/v2 + twitter/v2 downloader endpoints
Deploy Scraper / build-and-deploy (push) Canceled after 0s

Ported all missing downloader endpoints from Shirokami-API source
(verified against /home/code/Shirokami-API/scraper/downloader/):

- /download/videy: direct CDN link build (cdn.videy.co/{id}.mp4|.mov)
  matches videy.js exactly (id.len()==9 && id[8]=='2' -> .mov)
- /download/tiktok/v2: douyin.wtf hybrid API w/ fallback to embed scrape
- /download/twitter/v2: twitsave.com HTML scrape w/ fallback to Syndication API
- detect_platform now recognizes videy.co
- download_all_in_one dispatches videy

fetch_videy already existed as dead code (never wired); connected it.
== all others (bilibili/danbooru/dood/gdrive/instagram/kfiles/mediafire/
== mega/pinterest/pixeldrain/savetube/soundcloud/spotify/terabox/threads/
== tiktok/twitter/youtubeV2) already mapped to their Rust equivalents
This commit is contained in:
asepharyana
2026-09-01 18:36:54 +07:00
parent dfa37f86e3
commit dc44085cad
4 changed files with 78 additions and 0 deletions
+24
View File
@@ -219,6 +219,30 @@ pub async fn download_streamable(
Ok(Json(DownloadResponse::ok(result)))
}
/// Handler for _videy.
pub async fn download_videy(
Query(params): Query<DownloadParams>,
) -> Result<Json<DownloadResponse>, AppError> {
let result = use_cases::download_videy(&params.url).await?;
Ok(Json(DownloadResponse::ok(result)))
}
/// Handler for _tiktok_v2.
pub async fn download_tiktok_v2(
Query(params): Query<DownloadParams>,
) -> Result<Json<DownloadResponse>, AppError> {
let result = use_cases::download_tiktok_v2(&params.url).await?;
Ok(Json(DownloadResponse::ok(result)))
}
/// Handler for _twitter_v2.
pub async fn download_twitter_v2(
Query(params): Query<DownloadParams>,
) -> Result<Json<DownloadResponse>, AppError> {
let result = use_cases::download_twitter_v2(&params.url).await?;
Ok(Json(DownloadResponse::ok(result)))
}
/// Handler for _bilibili.
pub async fn download_bilibili(
Query(params): Query<DownloadParams>,
+12
View File
@@ -248,6 +248,18 @@ pub fn build_router(app_state: Arc<AppState>) -> anyhow::Result<Router> {
"/download/streamable",
axum::routing::get(crate::presentation::handler::downloader::download_streamable),
)
.route(
"/download/videy",
axum::routing::get(crate::presentation::handler::downloader::download_videy),
)
.route(
"/download/tiktok/v2",
axum::routing::get(crate::presentation::handler::downloader::download_tiktok_v2),
)
.route(
"/download/twitter/v2",
axum::routing::get(crate::presentation::handler::downloader::download_twitter_v2),
)
.route(
"/download/bilibili",
axum::routing::get(crate::presentation::handler::downloader::download_bilibili),