0

I created a selenium program that scrapes some info from my website and I am using Chrome headless as the webdriver. Now, whenever I scrape the data, it shows this message:

[0510/170058.841:INFO:CONSOLE(0)] "A cookie associated with a cross-site resource at https://accounts.google.com/ was set without the SameSite attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with SameSite=None and Secure. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.", source: https://www.mywebsite.com/ (0) [0510/170059.254:INFO:CONSOLE(0)] "A cookie associated with a cross-site resource at https://blogger.com/ was set without the SameSite attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with SameSite=None and Secure. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.", source: https://www.mywebsite.com/ (0)

Note: The "source: " in this message is not the actual one. I have changed it just for a reference.

Now I know this isn't an error and the program works as it should. But, I want to hide this message because it makes a huge mess when printing the output.

Ishaan Pathak
  • 53
  • 1
  • 6

1 Answers1

1

I use: .add_argument('--log-level=3') but this might suppress other messages you do want. Credit to this original answer: https://stackoverflow.com/a/20748376/11277108

Jossy
  • 589
  • 2
  • 12
  • 36