Open-source download manager & offline media toolbox for YouTube, music, social media, learning platforms & 1,800+ sites. Built with Tauri 2.0, Rust & Svelte.
Rust downloadmanagerguihacktoberfesthomebrewlightweightlinuxlinux-distributionlocal-firstmacosmacos-packagemedia-toolboxopen-sourcerustsveltetauritrendingtrending-repositorieswindowswindows-desktopytdlp
feat: update Hotmart API endpoints and add user agent to HTTP client
Tonho46b01e6ae204
diff --git a/src-tauri/src/platforms/hotmart/auth.rs b/src-tauri/src/platforms/hotmart/auth.rsindex 00d16128..3c6cb79b 100644--- a/src-tauri/src/platforms/hotmart/auth.rs+++ b/src-tauri/src/platforms/hotmart/auth.rs@@ -36,7 +36,7 @@ pub fn build_client_from_saved(saved: &SavedSession) -> anyhow::Result<reqwest::"https://hotmart.com","https://api-sec-vlc.hotmart.com","https://api-hub.cb.hotmart.com",- "https://api-club-course-consumption-gateway.hotmart.com",+ "https://api-club-course-consumption-gateway-ga.cb.hotmart.com","https://consumer.hotmart.com","https://api-club-hot-club-api.cb.hotmart.com",];@@ -68,6 +68,7 @@ pub fn build_client_from_saved(saved: &SavedSession) -> anyhow::Result<reqwest::default_headers.insert("cache-control", HeaderValue::from_static("no-cache"));let client = reqwest::Client::builder()+ .user_agent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36").cookie_provider(Arc::new(jar)).default_headers(default_headers).build()?;@@ -227,7 +228,7 @@ pub async fn authenticate(email: &str, password: &str) -> anyhow::Result<Hotmart"https://hotmart.com","https://api-sec-vlc.hotmart.com","https://api-hub.cb.hotmart.com",- "https://api-club-course-consumption-gateway.hotmart.com",+ "https://api-club-course-consumption-gateway-ga.cb.hotmart.com","https://consumer.hotmart.com","https://api-club-hot-club-api.cb.hotmart.com",];@@ -248,6 +249,7 @@ pub async fn authenticate(email: &str, password: &str) -> anyhow::Result<Hotmartdefault_headers.insert("cache-control", HeaderValue::from_static("no-cache"));let client = reqwest::Client::builder()+ .user_agent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36").cookie_provider(Arc::new(jar)).default_headers(default_headers).build()?;