mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-08-22 04:39:36 -04:00
fix merge error
This commit is contained in:
parent
f9ad480fae
commit
0f3d2b7172
1 changed files with 6 additions and 7 deletions
|
@ -51,7 +51,7 @@ def _timestamp4datetime(timestamp):
|
||||||
int(timestamp[-2:])
|
int(timestamp[-2:])
|
||||||
)
|
)
|
||||||
|
|
||||||
def should_ytdlp(page, site):
|
def should_ytdlp(worker, site, page):
|
||||||
# called only after we've passed needs_browsing() check
|
# called only after we've passed needs_browsing() check
|
||||||
if page.status_code != 200:
|
if page.status_code != 200:
|
||||||
logging.info("skipping ytdlp: non-200 page status")
|
logging.info("skipping ytdlp: non-200 page status")
|
||||||
|
@ -60,6 +60,11 @@ def should_ytdlp(page, site):
|
||||||
logging.info("skipping ytdlp: site marked skip_ytdlp")
|
logging.info("skipping ytdlp: site marked skip_ytdlp")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
ytdlp_url = page.redirect_url if page.redirect_url else page.url
|
||||||
|
|
||||||
|
if "chrome-error:" in ytdlp_url:
|
||||||
|
return False
|
||||||
|
|
||||||
ytdlp_seed = (
|
ytdlp_seed = (
|
||||||
site["metadata"]["ait_seed_id"]
|
site["metadata"]["ait_seed_id"]
|
||||||
if "metadata" in site and "ait_seed_id" in site["metadata"]
|
if "metadata" in site and "ait_seed_id" in site["metadata"]
|
||||||
|
@ -71,12 +76,6 @@ def should_ytdlp(page, site):
|
||||||
site.skip_ytdlp = True
|
site.skip_ytdlp = True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
ytdlp_url = page.redirect_url if page.redirect_url else page.url
|
|
||||||
|
|
||||||
if "chrome-error:" in ytdlp_url:
|
|
||||||
return False
|
|
||||||
|
|
||||||
ytdlp_seed = site["metadata"]["ait_seed_id"]
|
|
||||||
logging.info("checking containing page %s for seed %s", ytdlp_url, ytdlp_seed)
|
logging.info("checking containing page %s for seed %s", ytdlp_url, ytdlp_seed)
|
||||||
|
|
||||||
if ytdlp_seed and "youtube.com/watch?v" in ytdlp_url:
|
if ytdlp_seed and "youtube.com/watch?v" in ytdlp_url:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue