From 5a264f29d1d718fcf105625c6c34ec013d49a0e4 Mon Sep 17 00:00:00 2001 From: Barbara Miller Date: Thu, 18 Jul 2024 10:19:44 -0700 Subject: [PATCH] black'd --- brozzler/worker.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/brozzler/worker.py b/brozzler/worker.py index b43be1fd..3d20035a 100644 --- a/brozzler/worker.py +++ b/brozzler/worker.py @@ -261,7 +261,9 @@ def brozzle_page( except brozzler.PageInterstitialShown: self.logger.info("page interstitial shown (http auth): %s", page) - if enable_youtube_dl and ydl.should_ytdlp(site, page, browser.websock_thread.page_status, self._skip_av_seeds): + if enable_youtube_dl and ydl.should_ytdlp( + site, page, browser.websock_thread.page_status, self._skip_av_seeds + ): try: ydl_outlinks = ydl.do_youtube_dl(self, site, page) outlinks.update(ydl_outlinks) @@ -297,9 +299,11 @@ def _get_page_headers(self, page): page_headers = r.headers return page_headers - def _needs_browsing(self, page_headers): - if "content-type" in page_headers and "html" not in page_headers["content-type"]: + if ( + "content-type" in page_headers + and "html" not in page_headers["content-type"] + ): return False return True