Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grabbing cookies doesn't work. #44

Open
ghost opened this issue Apr 12, 2023 · 5 comments
Open

Grabbing cookies doesn't work. #44

ghost opened this issue Apr 12, 2023 · 5 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@ghost
Copy link

ghost commented Apr 12, 2023

I understand what the error means, but the thing is I cannot edit it or fix it since it takes no overloads. Could someone help me ?|

image

@MoistCoder
Copy link
Owner

Just edit the project with your fix and rebuild the dll

@ghost
Copy link
Author

ghost commented Apr 13, 2023

what

@MoistCoder
Copy link
Owner

The project is open source. Just change the file that does the trouble if you know how to fix it. Then rebuild the project. You will get a .dll file as build output.

@MoistCoder MoistCoder added bug Something isn't working help wanted Extra attention is needed labels Apr 13, 2023
@cuciuu
Copy link

cuciuu commented Apr 16, 2023

try this

To fix this, you can add a check to make sure that the cookies exist before trying to look at them. That way, if there are no cookies, you won't get an error.

chrome = new ChromeGrabber();
var Cookies = chrome.GetCookies();

if (!string.IsNullOrEmpty(Cookies))
{
    foreach (var item in Cookies)
    {
        Console.Writeline(item);
    }
} else
{
    Console.WriteLine("No cookies found.");
}


@MatthiasHeinz
Copy link

MatthiasHeinz commented Apr 22, 2023

@cuciuu

try this

To fix this, you can add a check to make sure that the cookies exist before trying to look at them. That way, if there are no cookies, you won't get an error.

chrome = new ChromeGrabber();
var Cookies = chrome.GetCookies();

if (!string.IsNullOrEmpty(Cookies))
{
    foreach (var item in Cookies)
    {
        Console.Writeline(item);
    }
} else
{
    Console.WriteLine("No cookies found.");
}

The error seems to occur inside var cookies = chrome.GetCookies();, thus your suggestion would not work at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants