Skip to content

Commit

Permalink
black'd
Browse files Browse the repository at this point in the history
  • Loading branch information
Barbara Miller committed Jul 18, 2024
1 parent 3f0227c commit 5a264f2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions brozzler/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 5a264f2

Please sign in to comment.