feat(stalk): add github + youtube profile stalk endpoints

Ported from Shirokami-API scraper/stalk/{github,youtube}.js:
- /stalk/github (GitHub public API profile)
- /stalk/youtube (ytInitialData parse from /videos subpage:
  handles lockupViewModel (new), videoRenderer, gridVideoRenderer,
  shortsLockupViewModel; channel metadata + top-5 videos)

Also fix misc harga-emas main price to smallest-gram (1gr).
This commit is contained in:
asepharyana committed 2026-09-01 19:31:37 +07:00
1 parent 6df8af54eb
commit 242e3498fe
7 files changed
+478

No files matched your search

+1
View File
@@ -4,3 +4,4 @@ pub mod downloader;
pub mod komik;
pub mod misc;
pub mod proxy;
pub mod stalk;
+19
View File
@@ -0,0 +1,19 @@
//! Application use-cases for stalk (profile/user lookups).
use crate::domain::error::ScrapingError;
use crate::infrastructure::repository::stalk as Repo;
use serde_json::Value;
/// GitHub user profile stalk.
pub async fn github(username: &str) -> Result<Value, ScrapingError> {
Repo::fetch_github_stalk(username)
.await
.map_err(ScrapingError::Http)
}
/// YouTube channel/profile stalk.
pub async fn youtube(username: &str) -> Result<Value, ScrapingError> {
Repo::fetch_youtube_stalk(username)
.await
.map_err(ScrapingError::Http)
}