mirror of
https://github.com/bellingcat/auto-archiver.git
synced 2026-06-07 19:08:30 +03:00
ci issues
This commit is contained in:
@@ -73,6 +73,7 @@ class AntibotExtractorEnricher(Extractor, Enricher):
|
|||||||
if self.enrich(result):
|
if self.enrich(result):
|
||||||
result.status = "antibot"
|
result.status = "antibot"
|
||||||
return result
|
return result
|
||||||
|
return False
|
||||||
|
|
||||||
def _prepare_user_data_dir(self):
|
def _prepare_user_data_dir(self):
|
||||||
if self.user_data_dir:
|
if self.user_data_dir:
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ class TestAntibotExtractorEnricher(TestExtractorBase):
|
|||||||
}
|
}
|
||||||
|
|
||||||
@pytest.mark.download
|
@pytest.mark.download
|
||||||
|
@pytest.mark.flaky(reruns=2, reruns_delay=5)
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"url,in_title,in_text,image_count,video_count,skip_ci",
|
"url,in_title,in_text,image_count,video_count,skip_ci",
|
||||||
[
|
[
|
||||||
@@ -128,6 +129,7 @@ class TestAntibotExtractorEnricher(TestExtractorBase):
|
|||||||
item = make_item(url)
|
item = make_item(url)
|
||||||
result = self.extractor.download(item)
|
result = self.extractor.download(item)
|
||||||
|
|
||||||
|
assert result, f"download() returned {result!r} — Selenium may have failed (e.g., window close timeout)"
|
||||||
assert result.status == "antibot", "Expected status to be 'antibot'"
|
assert result.status == "antibot", "Expected status to be 'antibot'"
|
||||||
|
|
||||||
# Check title contains all required words (case-insensitive)
|
# Check title contains all required words (case-insensitive)
|
||||||
|
|||||||
Reference in New Issue
Block a user