Skip to content
Closed
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
14 changes: 14 additions & 0 deletions src/notebooklm/cli/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,20 @@ def login(storage):

input("[Press ENTER when logged in] ")

# Navigate to accounts.google.com to ensure .google.com cookies are set
# (fixes UK/regional users whose cookies land on .google.co.uk)
# See: https://github.com/teng-lin/notebooklm-py/issues/146
try:
urls_to_visit = [
"https://accounts.google.com/",
"https://myaccount.google.com/",
"https://notebooklm.google.com/",
]
for url in urls_to_visit:
page.goto(url, wait_until="networkidle", timeout=10000)
except Exception as e:
logger.debug(f"Cross-domain cookie navigation failed: {e}")

current_url = page.url
if "notebooklm.google.com" not in current_url:
console.print(f"[yellow]Warning: Current URL is {current_url}[/yellow]")
Expand Down