mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-04-20 23:56:34 -04:00
add / check status code for yt-dlp
This commit is contained in:
parent
423f05b841
commit
12e49bf29e
@ -253,6 +253,8 @@ class BrozzlerWorker:
|
||||
browser, site, page, on_screenshot, on_request
|
||||
)
|
||||
outlinks.update(browser_outlinks)
|
||||
page.status_code = browser.websock_thread.page_status
|
||||
self.logger.info("url %s status code %s", page.url, page.status_code)
|
||||
except brozzler.PageInterstitialShown:
|
||||
self.logger.info("page interstitial shown (http auth): %s", page)
|
||||
|
||||
|
@ -33,6 +33,9 @@ thread_local = threading.local()
|
||||
|
||||
|
||||
def should_ytdlp(page):
|
||||
if page.status_code != 200:
|
||||
return False
|
||||
|
||||
ytdlp_url = page.redirect_url if page.redirect_url else page.url
|
||||
|
||||
if "chrome-error:" in ytdlp_url:
|
||||
|
Loading…
x
Reference in New Issue
Block a user