Check if valid authentication exists
(self)
| 50 | self.browser_state_dir = BROWSER_STATE_DIR |
| 51 | |
| 52 | def is_authenticated(self) -> bool: |
| 53 | """Check if valid authentication exists""" |
| 54 | if not self.state_file.exists(): |
| 55 | return False |
| 56 | |
| 57 | # Check if state file is not too old (7 days) |
| 58 | age_days = (time.time() - self.state_file.stat().st_mtime) / 86400 |
| 59 | if age_days > 7: |
| 60 | print(f"⚠️ Browser state is {age_days:.1f} days old, may need re-authentication") |
| 61 | |
| 62 | return True |
| 63 | |
| 64 | def get_auth_info(self) -> Dict[str, Any]: |
| 65 | """Get authentication information""" |
no outgoing calls
no test coverage detected