mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-08-05 21:14:13 -04:00
Make youtube-dl optional in BrozzlerWorker.brozzle_page
Enabled by default (of course). Speed is significantly improved when disabled.
This commit is contained in:
parent
a563e9eb0c
commit
9c81a7bbda
1 changed files with 25 additions and 23 deletions
|
@ -316,8 +316,10 @@ class BrozzlerWorker:
|
|||
|
||||
return full_jpeg, thumb_jpeg
|
||||
|
||||
def brozzle_page(self, browser, site, page, on_screenshot=None):
|
||||
def brozzle_page(self, browser, site, page, on_screenshot=None,
|
||||
enable_youtube_dl=True):
|
||||
self.logger.info("brozzling {}".format(page))
|
||||
if enable_youtube_dl:
|
||||
try:
|
||||
with tempfile.TemporaryDirectory(prefix='brzl-ydl-') as tempdir:
|
||||
ydl = self._youtube_dl(tempdir, site)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue