From 75a9354987b6b03be797a361f3f100e303aeba1b Mon Sep 17 00:00:00 2001 From: wen Date: Wed, 10 Jan 2024 23:15:22 +0800 Subject: [PATCH] refactor: doesn't write iptc when file status is "uptodate" --- src/favorites_crawler/pipelines.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/favorites_crawler/pipelines.py b/src/favorites_crawler/pipelines.py index 3d3c3b2..b051bf5 100644 --- a/src/favorites_crawler/pipelines.py +++ b/src/favorites_crawler/pipelines.py @@ -63,6 +63,8 @@ def item_completed(self, results, item, info): for success, result in results: if not (success and item.tags): continue + if result.get('status') == 'uptodate': + continue path = item.get_filepath(result['url'], info.spider) try: msg = self.exif_tool.set_tags(