Skip to content

Commit 79fd88d

Browse files
author
Barbara Miller
committed
predup check for all urls
1 parent 6a8c62f commit 79fd88d

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

brozzler/worker.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,25 @@ def should_ytdlp(self, logger, site, page, page_status):
316316
ytdlp_url,
317317
str(e),
318318
)
319+
else:
320+
# check all other urls, using default value for recent, currently 30 days
321+
try:
322+
recent_capture_exists = self._video_data.recent_video_captures(
323+
site, ytdlp_url
324+
)
325+
if recent_capture_exists:
326+
logger.info(
327+
"recent previous captures of %s found, skipping ytdlp",
328+
ytdlp_url,
329+
)
330+
return False
331+
except Exception as e:
332+
logger.warning(
333+
"exception querying for previous capture for %s: %s",
334+
ytdlp_url,
335+
str(e),
336+
)
337+
319338
return True
320339

321340
@metrics.brozzler_page_processing_duration_seconds.time()

0 commit comments

Comments
 (0)