Skip to content

Commit

Permalink
Update logic for finding consent in url
Browse files Browse the repository at this point in the history
  • Loading branch information
dpguthrie committed Dec 16, 2023
1 parent 2047ddc commit 399284b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions yahooquery/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1385,7 +1385,7 @@ def setup_session(session: requests.Session, url: str = None):
response = response.result()

# check for and handle consent page:w
if response.url.find("consent"):
if response.url.find("consent") >= 0:
logger.debug(f'Redirected to consent page: "{response.url}"')

soup = BeautifulSoup(response.content, "html.parser")
Expand All @@ -1398,7 +1398,7 @@ def setup_session(session: requests.Session, url: str = None):
logger.critical(
f'Failed to find or extract "{param}" from response. Exception={exc}'
)
return
return session

logger.debug(f"params: {params}")

Expand Down

0 comments on commit 399284b

Please sign in to comment.