I'm trying to connect to Tradingview with cookie using selenium and python
I have the cookie in my folder.... ok
Now i am trying to load the cookie and connect with it ... without result :(
any help is welcome.
thank you
here the code to load the cookie
# Create WebDriverWait
self.wait = WebDriverWait(self.driver, 20)
self.driver.get("https://www.tradingview.com")
with open('cookies.pkl', 'rb') as f:
cookies = pickle.load(f)
for cookie in cookies:
cookie['domain'] = ".tradingview.com"
try:
self.driver.add_cookie(cookie)
except Exception as e:
print(e)
#self.driver.refresh()
self.driver.get('https://www.tradingview.com/')
time.sleep(30)