diff options
| author | Teddy Wing | 2023-05-15 21:29:39 +0200 |
|---|---|---|
| committer | Teddy Wing | 2023-05-15 21:29:39 +0200 |
| commit | 0faf1c0cf520c08116786f64cc17defa6acd92f1 (patch) | |
| tree | 6394e5bd91d0ac9bffcce8b856efe8b4031d5b5d | |
| parent | c175d9dc7e3df6af0905b7b597fae67539ce6c6c (diff) | |
| download | cws-status-0faf1c0cf520c08116786f64cc17defa6acd92f1.tar.bz2 | |
cws-status: Add new logged out check
There's another instance when the user can be logged out and the "Sign
in to continue" string doesn't appear on the page. Also report this as a
logged out error.
| -rw-r--r-- | cws-status | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -85,8 +85,10 @@ page_html = opener.open(url).read() # Check whether we're authenticated. not_logged_in_search = b'Sign in to continue to Chrome Web Store' +signin_search = b'<base href="https://accounts.google.com/v3/signin/"' -if not_logged_in_search in page_html: +if not_logged_in_search in page_html \ +or signin_search in page_html: print('error: not authenticated', file=sys.stderr) sys.exit(EX_NOUSER) |
