From: Oleg Broytman Date: Wed, 7 Aug 2024 21:51:21 +0000 (+0300) Subject: Feat(check_urls): Separately report redirects X-Git-Tag: 5.6.0~5 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=ebdbe96b2f8436e09e4c55a77ca6143224d08119;p=bookmarks_db.git Feat(check_urls): Separately report redirects --- diff --git a/check_urls.py b/check_urls.py index 103553a..2111b3f 100755 --- a/check_urls.py +++ b/check_urls.py @@ -56,15 +56,18 @@ def run(): log.close() for bookmark in bookmarks: + moved_to = getattr(bookmark, 'moved', None) if hasattr(bookmark, 'error'): print(bookmark.error) + elif moved_to: + print("Moved to: %s" % moved_to) + else: print("""\ Title: %s URL: %s LastModified: %s - Moved: %s Size: %s Md5: %s IconURI: %s @@ -75,7 +78,6 @@ def run(): or getattr(bookmark, 'title', None), bookmark.href, strftime(bookmark.last_modified), - getattr(bookmark, 'moved', None), getattr(bookmark, 'size', None), getattr(bookmark, 'md5', None), bookmark.icon_href, bookmark.icon, bookmark.charset,