From d2d8d93538bc2387e7ce8eaaffdf8ab6a2b7a82a Mon Sep 17 00:00:00 2001 From: bytedream Date: Tue, 9 Apr 2024 22:55:53 +0200 Subject: [PATCH] Fix anonymous login --- Cargo.toml | 1 + src/crunchyroll.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index c1447f7..485ee1b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,6 +38,7 @@ serde_json = "1.0" serde_urlencoded = "0.7" smart-default = "0.7" tokio = { version = "1.37", features = ["sync"] } +uuid = { version = "1.8", features = ["v4"] } webpki-roots = "0.26" crunchyroll-rs-internal = { version = "0.10.4", path = "internal" } diff --git a/src/crunchyroll.rs b/src/crunchyroll.rs index d4c0c4e..e45813b 100644 --- a/src/crunchyroll.rs +++ b/src/crunchyroll.rs @@ -371,6 +371,7 @@ mod auth { .post(endpoint) .header(header::AUTHORIZATION, "Basic Y3Jfd2ViOg==") .header(header::CONTENT_TYPE, "application/x-www-form-urlencoded") + .header("ETP-Anonymous-ID", uuid::Uuid::new_v4().to_string()) .body( serde_urlencoded::to_string([ ("grant_type", "client_id"),