Skip to content

Commit

Permalink
Update YoutubeExplode/YoutubeHttpHandler.cs
Browse files Browse the repository at this point in the history
Co-authored-by: Oleksii Holub <[email protected]>
  • Loading branch information
tmm360 and Tyrrrz authored Aug 30, 2023
1 parent 6813ca6 commit adc90a8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions YoutubeExplode/YoutubeHttpHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ public YoutubeHttpHandler(
: base(http, disposeClient)
{
// Pre-fill cookies
//required cookies
_cookieContainer.Add(new Cookie("SOCS", "CAESEwgDEgk0ODE3Nzk3MjQaAmVuIAEaBgiA_LyaBg") { Domain = "youtube.com" }); //cookie consent request bypass

//user cookies
foreach (var cookie in initialCookies)
_cookieContainer.Add(cookie);

// Required consent cookie
// https://github.com/Tyrrrz/YoutubeExplode/issues/730
_cookieContainer.Add(new Cookie("SOCS", "CAESEwgDEgk0ODE3Nzk3MjQaAmVuIAEaBgiA_LyaBg") { Domain = "youtube.com" });
}

private string? TryGenerateAuthHeaderValue(Uri uri)
Expand Down

0 comments on commit adc90a8

Please sign in to comment.