I'm working on a project and I have to go to a site and drop a soy there. I am trying to do this using the Python selenium module, but when I enter the site with a bot, I get a popup (an acceptance form about cookies). I cannot achieve what I am trying to do without pressing accept.
I checked the network section of the site and found the site containing cookies, when I enter that site the code works properly and it succeeds in pushing the accept cookies button, but this does not work for me because it cannot even find the accept button on the main site, I know it is not because it is written in javascript, but i don't know how to do this.
Anyway, let's get to the code part.
on the site I'm trying to login
the site that sent the cookie form the site uses
this code works for this:
from selenium import webdriver
import time
from bs4 import BeautifulSoup
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
option = webdriver.ChromeOptions()
option.add_argument('--disable-notifications')
option.add_argument("--mute-audio")
driver = webdriver.Chrome("chromedriver.exe", options=option)
driver.get('https://consent-pref.trustarc.com/?type=jefftest_ibm&site=ibm.com&action=notice&country=tr&locale=tr&behavior=expressed>m=1&layout=default_eu&irm=undefined&from=https://consent.trustarc.com/#')
time.sleep(10)
driver.find_elements_by_class_name("call")[0].click()
but it doesn't work for the other, how can I get this to work for the other too?
