Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions requestium/requestium_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import tldextract
from parsel.selector import Selector, SelectorList
from selenium.common.exceptions import WebDriverException
from selenium.common.exceptions import NoSuchWindowException, WebDriverException
from selenium.webdriver.common.by import By, ByType
from selenium.webdriver.remote.webdriver import WebDriver as RemoteWebDriver
from selenium.webdriver.support import expected_conditions
Expand Down Expand Up @@ -71,7 +71,7 @@ def ensure_add_cookie(self, cookie: dict[str, Any], override_domain: str | None
cookie_domain = cookie["domain"] if cookie["domain"][0] != "." else cookie["domain"][1:]
try:
browser_domain = tldextract.extract(self.current_url).fqdn
except AttributeError:
except (AttributeError, NoSuchWindowException):
browser_domain = ""
if cookie_domain not in browser_domain:
# TODO @joaqo: Check if hardcoding 'http' causes trouble.
Expand Down
Loading