mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-09-23 14:14:43 -04:00
Merge branch 'predup_type_playlist' into qa
This commit is contained in:
commit
fcf966fca4
1 changed files with 20 additions and 17 deletions
|
@ -98,6 +98,8 @@ class BrozzlerWorker:
|
||||||
from brozzler.video_data import VideoDataClient
|
from brozzler.video_data import VideoDataClient
|
||||||
|
|
||||||
self._video_data = VideoDataClient()
|
self._video_data = VideoDataClient()
|
||||||
|
else:
|
||||||
|
self._video_data = None
|
||||||
|
|
||||||
self._warcprox_auto = warcprox_auto
|
self._warcprox_auto = warcprox_auto
|
||||||
self._proxy = proxy
|
self._proxy = proxy
|
||||||
|
@ -301,24 +303,25 @@ class BrozzlerWorker:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# predup...
|
# predup...
|
||||||
logger.info("checking for recent previous captures of %s", ytdlp_url)
|
if self._video_data:
|
||||||
recent = 90 if "youtube.com/watch" in ytdlp_url else 30
|
logger.info("checking for recent previous captures of %s", ytdlp_url)
|
||||||
try:
|
recent = 90 if "youtube.com/watch" in ytdlp_url else 30
|
||||||
recent_capture_exists = self._video_data.recent_video_capture_exists(
|
try:
|
||||||
site, ytdlp_url, recent
|
recent_capture_exists = self._video_data.recent_video_capture_exists(
|
||||||
)
|
site, ytdlp_url, recent
|
||||||
if recent_capture_exists:
|
)
|
||||||
logger.info(
|
if recent_capture_exists:
|
||||||
"recent capture of %s found, skipping ytdlp",
|
logger.info(
|
||||||
ytdlp_url,
|
"recent capture of %s found, skipping ytdlp",
|
||||||
|
ytdlp_url,
|
||||||
|
)
|
||||||
|
return False
|
||||||
|
except Exception as e:
|
||||||
|
logger.warning(
|
||||||
|
"exception querying for previous capture for %s: %s",
|
||||||
|
ytdlp_url,
|
||||||
|
str(e),
|
||||||
)
|
)
|
||||||
return False
|
|
||||||
except Exception as e:
|
|
||||||
logger.warning(
|
|
||||||
"exception querying for previous capture for %s: %s",
|
|
||||||
ytdlp_url,
|
|
||||||
str(e),
|
|
||||||
)
|
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue