Skip to content

Custom cookies get overriden by default value #909

@Guacam-Ole

Description

@Guacam-Ole

Version

6.5.4

Platform

Any

Steps to reproduce

When calling the constructor with a custom cookie like described in the readme:

using YoutubeExplode;

// Perform authentication and extract cookies
var cookies = ...;

// Cookie collection must be of type IReadOnlyList<System.Net.Cookie>
var youtube = new YoutubeClient(cookies);

any "SOCS" - cookie gets overwritten by the default value from the YouTubeHttpHandler

  _cookieContainer.Add(
            new Cookie("SOCS", "CAISEwgDEgk2NzM5OTg2ODUaAmVuIAEaBgiA6p23Bg")
            {
                Domain = "youtube.com",
            }
        );

Details

Expected behavior: Custom Cookies remain in the HttpClient
Actual behavior: Custom Cookies get overwritten by default value

Checklist

  • I have looked through existing issues to make sure that this bug has not been reported before
  • I have provided a descriptive title for this issue
  • I have made sure that this bug is reproducible on the latest version of the package
  • I have provided all the information needed to reproduce this bug as efficiently as possible
  • I have sponsored this project
  • I have not read any of the above and just checked all the boxes to submit the issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions