mirror of
https://github.com/bellingcat/auto-archiver.git
synced 2026-06-08 03:18:28 +03:00
Testing Linkedin Dropin for Antibot
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
# reddit test credentials
|
# ANTIBOT reddit test credentials
|
||||||
REDDIT_TEST_USERNAME=""
|
REDDIT_TEST_USERNAME=""
|
||||||
REDDIT_TEST_PASSWORD=""
|
REDDIT_TEST_PASSWORD=""
|
||||||
|
|
||||||
|
# ANTIBOT linkedin test credentials
|
||||||
|
LINKEDIN_TEST_USERNAME=""
|
||||||
|
LINKEDIN_TEST_PASSWORD=""
|
||||||
|
|
||||||
# twitter test credentials
|
# twitter test credentials
|
||||||
TWITTER_BEARER_TOKEN="TEST_KEY"
|
TWITTER_BEARER_TOKEN="TEST_KEY"
|
||||||
@@ -41,7 +41,11 @@ class TestAntibotExtractorEnricher(TestExtractorBase):
|
|||||||
"reddit.com": {
|
"reddit.com": {
|
||||||
"username": os.environ.get("REDDIT_TEST_USERNAME"),
|
"username": os.environ.get("REDDIT_TEST_USERNAME"),
|
||||||
"password": os.environ.get("REDDIT_TEST_PASSWORD"),
|
"password": os.environ.get("REDDIT_TEST_PASSWORD"),
|
||||||
}
|
},
|
||||||
|
"linkedin.com": {
|
||||||
|
"username": os.environ.get("LINKEDIN_TEST_USERNAME"),
|
||||||
|
"password": os.environ.get("LINKEDIN_TEST_PASSWORD"),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -148,6 +152,28 @@ class TestAntibotExtractorEnricher(TestExtractorBase):
|
|||||||
):
|
):
|
||||||
self.test_download_pages_with_media(setup_module, make_item, url, in_title, in_text, image_count, video_count)
|
self.test_download_pages_with_media(setup_module, make_item, url, in_title, in_text, image_count, video_count)
|
||||||
|
|
||||||
|
@pytest.mark.skipif(
|
||||||
|
not os.environ.get("REDDIT_TEST_USERNAME") or not os.environ.get("REDDIT_TEST_PASSWORD"),
|
||||||
|
reason="No Reddit test credentials provided",
|
||||||
|
)
|
||||||
|
@pytest.mark.download
|
||||||
|
@pytest.mark.parametrize(
|
||||||
|
"url,in_title,in_text,image_count,video_count",
|
||||||
|
[
|
||||||
|
(
|
||||||
|
"https://www.linkedin.com/posts/bellingcat_live-podcast-bellingcat-activity-7331725631799398400-xocM/",
|
||||||
|
"Post",
|
||||||
|
"It takes time to go from hunch to reporting...",
|
||||||
|
2,
|
||||||
|
0,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
def test_linkedin_download_with_login(
|
||||||
|
self, setup_module, make_item, url, in_title, in_text, image_count, video_count
|
||||||
|
):
|
||||||
|
self.test_download_pages_with_media(setup_module, make_item, url, in_title, in_text, image_count, video_count)
|
||||||
|
|
||||||
@pytest.mark.download
|
@pytest.mark.download
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"url,in_html",
|
"url,in_html",
|
||||||
|
|||||||
Reference in New Issue
Block a user