While utilizing Selenium and Python, a cookie connected with a cross-site resource at http://yahoo.com/ was established without the inclusion of the `SameSite` attribute

Scraping a website using selenium resulted in the following message appearing in the output, amidst the desired content:

[0306/125211.693:INFO:CONSOLE(0)] "A cookie associated with a cross-site resource at http://yahoo.com/ was set without the `SameSite` attribute.
...

Code Used:

from selenium import webdriver
from selenium.webdriver.chrome.options import Options

user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) ' \
             'Chrome/80.0.3987.132 Safari/537.36'

driver_exe = 'chromedriver'
options = Options()
options.add_argument("--headless")
options.add_argument(f'user-agent={user_agent}')
options.add_argument("--disable-web-security")
options.add_argument("--allow-running-insecure-content")
options.add_argument("--allow-cross-origin-auth-prompt")
options.add_argument("--disable-cookie-encryption")

driver = webdriver.Chrome(executable_path=r"C:\Users\intel\Downloads\Setups\chromedriver.exe", options=options)
driver.get("https://www.amazon.com/s?k=asus&rh=n%3A300189&nav_sdd=aps&pd_rd_r=58b28d7d-1955-433b-b33b-b1b5dcf1f522&pd_rd_w=MJzan&pd_rd_wg=QG3cj&pf_rd_p=6d81377b-6d6c-4363-ae02-8fa202ed7b50&pf_rd_r=X0BDDAPN7TTW0ZT1REX6&qid=1583290662&ref=sxwds-sbc_c2")

class_Name = "a-size-medium a-color-base a-text-normal"
x = driver.find_elements_by_class_name(class_Name.replace(' ','.'))

for i in list(x):
    print(i.text,"\n")

The Output Including CORS Policy:

list of ASUS products...

[0306/125211.693:INFO:CONSOLE(0)] "A cookie associated with a cross-site resource at http://yahoo.com/ was set without the `SameSite` attribute...
[0306/125211.696:INFO:CONSOLE(0)] "A cookie associated with a cros...

more list of ASUS products...

ASUS GT-AC5300 ROG Rapture TriBand 4x4 AC5300 Gaming WiFi Router

ASUS RT-AC87R Wireless-AC2400 Dual Band Gigabit Router

ASUS RT-AC66R 802.11ac Dual-Band Wireless-AC1750 Gigabit Router

ASUS Dual-Band AC750 wireless router 733 Mbps with USB port (RT-AC51U)

NETGEAR Nighthawk X4S Smart WiFi Router (R7800) - AC2600 Wireless Speed (up to 2600 Mbps) | Up to 2500 sq ft Coverage & 45 Devices | 4 x 1G Ethernet, 2 x 3.0 USB, and 1 x eSATA ports

ASUS RT-AC1900 Dual Band WiFi Router

How can I eliminate the CORS line from my output? Any assistance would be greatly appreciated!

Answer №1

When this error message pops up...

[0306/125211.693:INFO:CONSOLE(0)] "A cookie from http://yahoo.com/ was created without the necessary 'SameSite' attribute.

It's actually an INFO aimed at raising awareness of a new standard intended to encourage developers to comply.

In upcoming Chrome releases, cookies will only be sent with cross-site requests if they have been configured with SameSite=None and Secure. For further information, you can inspect cookies in developer tools under Application>Storage>Cookies or visit and .

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Eliminate duplicate elements in various lists (compress multiple lists) based on their values

If I have a collection of lists: [[0,0,0,1,2,3],[0,0,0,4,5,6],[0,0,0,0,7,8],[0,0,0,0,0,9]] I am looking to create a new list where common null, zero, or specific values are removed from each inner list to achieve the desired output: [[1,2,3],[4,5,6],[0, ...

Provide input to a currently active webdriver

Currently, I am in the process of using Pytest to create an automation script utilizing a Selenium Chrome driver. As someone who is relatively new to coding, there are certain aspects that I am struggling to automate efficiently; hence, I am exploring alte ...

Personalize options for borders and points based on data in a spreadsheet

I have recently constructed a network using NetworkX based on a source-target dataframe: import networkx as nx G = nx.from_pandas_edgelist(df, source='Person1', target='Person2') Here is the dataset I am working with: Person1 ...

Why is Python BeautifulSoup's findAll function not returning all the elements in the web page

I am attempting to retrieve information from the following URL . Displayed below is the code I have developed. import requests from bs4 import BeautifulSoup url_str = 'https://99airdrops.com/page/1/' page = requests.get(url_str, headers={&apo ...

Tips for enhancing the parsing of arbitrary song lists

Interested in parsing tracklistings found in various formats, with lines like: artist - title artist-title artist / title artist - "title" 1. artist - title 0:00 - artist - tit le 05 artist - title 12:20 artist - title [record label] These text files ...

Is it feasible to create a progress bar using tqdm with the .write() method

Recently, I came up with an idea for a script that encrypts and decrypts files in a specific folder. In this script, the .write() function plays a crucial role in writing encrypted or decrypted bytes to a file. Now, I want to enhance it by adding progress ...

Using AngularJS client and Flask server for a RESTful call, one can include the

I am currently facing an issue where I need to send a REST request from my AngularJs client to a Flask server. The problem arises when one of the ids (key) in the request contains a forward slash. Interestingly, if the key does not contain a slash, the re ...

Locate element using value in Selenium with Python

Currently, I am utilizing Selenium in conjunction with Python to autonomously extract data from various power plants. One challenge I am facing is the need to click on an element within each plant's unique interface. The difficulty lies in the fact th ...

The method Element.getText() will return an empty string

This image displays a field that is pre-populated from the API, and I am attempting to automate it using the command below. Once it's available, I check if it's not null. https://i.stack.imgur.com/xSAte.png <div class="MuiInputBase-root Mu ...

The issue of Lost UI Shared Context is being displayed by ChromeDriver

My Windows 10 laptop is currently running a Windows 7 Virtual Machine. When I try to start the WebDriver inside the Virtual Machine, I encounter an error message that says gpu_process_transport_factory.cc<1009> Lost UI shared context: IWebDriver driver ...

Execute a bash command using Appium

I have a bash script that deletes my temporary files after each test, ensuring a clean slate for the next one. Is there a way to run bash commands or execute a bash script using Appium at the end of every test? Currently, our tests are written in C# - id ...

Is there a way to send HTML element values to a MySQL Database in Django using Ajax without utilizing a form?

As a Django newcomer, I am currently encountering an issue with posting HTML tag data into the database. I have implemented a "PICK CASE" button that, when clicked, should pass the user_id (hidden in an HTML tag with display:none) and case_id from the tag ...

Comparison between Python and Anaconda installation

As a newcomer to Python, I am taking small steps and have successfully installed Anaconda. While I know that Python is included by default in Anaconda, I'm encountering some difficulties. Most online resources recommend using the "command prompt" for ...

Changing a fluid CSS selector into a fixed one

Trying to figure out how to use a dynamic CSS selector in my robot framework test. Is there a way to incorporate regex here? Here is the current selector I am using : #weekend11063281 > a:nth-child(1) Open to any suggestions on how to eliminate the d ...

Issue encountered on Cloud Run: The container encountered an error while trying to initiate. It failed to start and establish connection on the designated port specified by the PORT environment variable

As a newcomer to asking questions on SO, I appreciate your patience. Despite the abundance of existing answers, none seem to solve my issue. I've been developing a Django web app and now need to deploy it for mobile access. My attempts to run it on Go ...

Navigating a Dropdown menu using Selenium: A step-by-step guide

Actions actions = new Actions(driver); WebElement mainMenu = driver.findElement(By.xpath(".//*[@id='yui-gen2']/a")); actions.moveToElement(mainMenu).build().perform(); WebElement subMenu = driver.findElement(By.xpath(".//*[@id='helpAbout&apo ...

Can you explain the slow parameter feature in Mocha?

While configuring mochaOpts in Protractor, one of the parameters we define is 'slow'. I'm unsure of the purpose of this parameter. I attempted adjusting its value but did not observe any impact on the test execution time. mochaOpts: { re ...

In Theano, when int32 and float32 are multiplied together, the resulting product will be in the form

After compiling the following function: x = theano.tensor.imatrix('x') y = theano.tensor.fmatrix('y') z = x.dot(y) f = theano.function([x, y], z) I noticed that the output is always float64, even when x is int32 and y is float32. Howe ...

Generating a new set of data by looping through the existing values to create a new column

I need help creating a new column in my data frame to indicate if the game ended in a home victory, away victory or a draw. Here is the code I am currently using: for index, row in df2.iterrows(): if row['home_goals'] > row['away_goa ...

Transitioning from an iFrame back to the Parent Frame and locating an element within the Parent Frame using Selenium Webdriver in C#

Situation: - On a page with an iFrame Text Editor and a button, I need to read from the Text Editor body within the iFrame. - Once done reading, I want to click on the button in the parent frame of the page. - Attempting to switch back to the parent frame ...