mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-04-20 23:56:34 -04:00
WT-2950 replace skip_ytdlp with video_capture
This commit is contained in:
parent
d9ed5c434a
commit
eb227b0d4e
@ -235,8 +235,8 @@ class Site(doublethink.Document, ElapsedMixIn):
|
||||
self.last_claimed = brozzler.EPOCH_UTC
|
||||
if not "scope" in self:
|
||||
self.scope = {}
|
||||
if not "skip_ytdlp" in self:
|
||||
self.skip_ytdlp = None
|
||||
if "video_capture" not in self:
|
||||
self.video_capture = "ENABLE_VIDEO_CAPTURE"
|
||||
|
||||
# backward compatibility
|
||||
if "surt" in self.scope:
|
||||
|
@ -38,8 +38,8 @@ def should_ytdlp(site, page, page_status):
|
||||
if page_status != 200:
|
||||
logging.info("skipping ytdlp: non-200 page status %s", page_status)
|
||||
return False
|
||||
if site.skip_ytdlp:
|
||||
logging.info("skipping ytdlp: site marked skip_ytdlp")
|
||||
if site.video_capture != "ENABLE_VIDEO_CAPTURE":
|
||||
logging.info("skipping ytdlp: site has video capture disabled")
|
||||
return False
|
||||
|
||||
ytdlp_url = page.redirect_url if page.redirect_url else page.url
|
||||
|
Loading…
x
Reference in New Issue
Block a user