mirror of
https://github.com/bellingcat/cisticola.git
synced 2026-06-13 05:48:33 +03:00
added methods for extracting channel profile metadata, and tests
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import pytest
|
||||
|
||||
from cisticola.base import Channel
|
||||
from cisticola.scraper import GabScraper
|
||||
|
||||
@@ -14,3 +16,10 @@ def test_scrape_gab_channel(controller, channel_kwargs):
|
||||
channels = [Channel(**channel_kwargs['gab'])]
|
||||
controller.register_scraper(scraper = GabScraper())
|
||||
controller.scrape_channels(channels = channels, archive_media = True)
|
||||
|
||||
@pytest.mark.profile
|
||||
def test_scrape_gab_profile(channel_kwargs):
|
||||
|
||||
scraper = GabScraper()
|
||||
channel = Channel(**channel_kwargs['gab'])
|
||||
scraper.get_profile(channel=channel)
|
||||
@@ -1,3 +1,5 @@
|
||||
import pytest
|
||||
|
||||
from cisticola.base import Channel
|
||||
from cisticola.scraper import GettrScraper
|
||||
|
||||
@@ -14,3 +16,10 @@ def test_scrape_gettr_channel(controller, channel_kwargs):
|
||||
channels = [Channel(**channel_kwargs['gettr'])]
|
||||
controller.register_scraper(scraper = GettrScraper())
|
||||
controller.scrape_channels(channels = channels, archive_media = True)
|
||||
|
||||
@pytest.mark.profile
|
||||
def test_scrape_gettr_profile(channel_kwargs):
|
||||
|
||||
scraper = GettrScraper()
|
||||
channel = Channel(**channel_kwargs['gettr'])
|
||||
scraper.get_profile(channel=channel)
|
||||
@@ -1,3 +1,5 @@
|
||||
import pytest
|
||||
|
||||
from cisticola.base import Channel
|
||||
from cisticola.scraper import InstagramScraper
|
||||
|
||||
@@ -14,3 +16,10 @@ def test_scrape_instagram_channel(controller, channel_kwargs):
|
||||
channels = [Channel(**channel_kwargs['instagram'])]
|
||||
controller.register_scraper(scraper = InstagramScraper())
|
||||
controller.scrape_channels(channels = channels, archive_media = True)
|
||||
|
||||
@pytest.mark.profile
|
||||
def test_scrape_instagram_profile(channel_kwargs):
|
||||
|
||||
scraper = InstagramScraper()
|
||||
channel = Channel(**channel_kwargs['instagram'])
|
||||
scraper.get_profile(channel=channel)
|
||||
@@ -1,3 +1,5 @@
|
||||
import pytest
|
||||
|
||||
from cisticola.base import Channel
|
||||
from cisticola.scraper import OdyseeScraper
|
||||
|
||||
@@ -14,3 +16,10 @@ def test_scrape_odysee_channel(controller, channel_kwargs):
|
||||
channels = [Channel(**channel_kwargs['odysee'])]
|
||||
controller.register_scraper(scraper = OdyseeScraper())
|
||||
controller.scrape_channels(channels = channels, archive_media = True)
|
||||
|
||||
@pytest.mark.profile
|
||||
def test_scrape_odysee_profile(channel_kwargs):
|
||||
|
||||
scraper = OdyseeScraper()
|
||||
channel = Channel(**channel_kwargs['odysee'])
|
||||
scraper.get_profile(channel=channel)
|
||||
@@ -1,3 +1,5 @@
|
||||
import pytest
|
||||
|
||||
from cisticola.base import Channel
|
||||
from cisticola.scraper import RumbleScraper
|
||||
|
||||
@@ -14,3 +16,10 @@ def test_scrape_rumble_channel(controller, channel_kwargs):
|
||||
channels = [Channel(**channel_kwargs['rumble'])]
|
||||
controller.register_scraper(scraper = RumbleScraper())
|
||||
controller.scrape_channels(channels = channels, archive_media = True)
|
||||
|
||||
@pytest.mark.profile
|
||||
def test_scrape_rumble_profile(channel_kwargs):
|
||||
|
||||
scraper = RumbleScraper()
|
||||
channel = Channel(**channel_kwargs['rumble'])
|
||||
scraper.get_profile(channel=channel)
|
||||
@@ -1,3 +1,5 @@
|
||||
import pytest
|
||||
|
||||
from cisticola.base import Channel
|
||||
from cisticola.scraper import TelegramSnscrapeScraper
|
||||
|
||||
@@ -14,3 +16,10 @@ def test_scrape_telegram_snscrape_channel(controller, channel_kwargs):
|
||||
channels = [Channel(**channel_kwargs['telegram'])]
|
||||
controller.register_scraper(scraper = TelegramSnscrapeScraper())
|
||||
controller.scrape_channels(channels = channels, archive_media = True)
|
||||
|
||||
@pytest.mark.profile
|
||||
def test_scrape_telegram_snscrape_profile(channel_kwargs):
|
||||
|
||||
scraper = TelegramSnscrapeScraper()
|
||||
channel = Channel(**channel_kwargs['telegram'])
|
||||
scraper.get_profile(channel=channel)
|
||||
@@ -1,3 +1,5 @@
|
||||
import pytest
|
||||
|
||||
from cisticola.base import Channel
|
||||
from cisticola.scraper import TelegramTelethonScraper
|
||||
|
||||
@@ -14,3 +16,10 @@ def test_scrape_telegram_telethon_channel(controller, channel_kwargs):
|
||||
channels = [Channel(**channel_kwargs['telegram'])]
|
||||
controller.register_scraper(scraper = TelegramTelethonScraper())
|
||||
controller.scrape_channels(channels = channels, archive_media = True)
|
||||
|
||||
@pytest.mark.profile
|
||||
def test_scrape_telegram_telethon_profile(channel_kwargs):
|
||||
|
||||
scraper = TelegramTelethonScraper()
|
||||
channel = Channel(**channel_kwargs['telegram'])
|
||||
scraper.get_profile(channel=channel)
|
||||
@@ -1,3 +1,5 @@
|
||||
import pytest
|
||||
|
||||
from cisticola.base import Channel
|
||||
from cisticola.scraper import TwitterScraper
|
||||
|
||||
@@ -14,3 +16,10 @@ def test_scrape_twitter_channel(controller, channel_kwargs):
|
||||
channels = [Channel(**channel_kwargs['twitter'])]
|
||||
controller.register_scraper(scraper = TwitterScraper())
|
||||
controller.scrape_channels(channels = channels, archive_media = True)
|
||||
|
||||
@pytest.mark.profile
|
||||
def test_scrape_twitter_profile(channel_kwargs):
|
||||
|
||||
scraper = TwitterScraper()
|
||||
channel = Channel(**channel_kwargs['twitter'])
|
||||
scraper.get_profile(channel=channel)
|
||||
@@ -1,3 +1,5 @@
|
||||
import pytest
|
||||
|
||||
from cisticola.base import Channel
|
||||
from cisticola.scraper import VkontakteScraper
|
||||
|
||||
@@ -14,3 +16,10 @@ def test_scrape_vkontakte_channel(controller, channel_kwargs):
|
||||
channels = [Channel(**channel_kwargs['vkontakte'])]
|
||||
controller.register_scraper(scraper = VkontakteScraper())
|
||||
controller.scrape_channels(channels = channels, archive_media = True)
|
||||
|
||||
@pytest.mark.profile
|
||||
def test_scrape_vkontakte_profile(channel_kwargs):
|
||||
|
||||
scraper = VkontakteScraper()
|
||||
channel = Channel(**channel_kwargs['vkontakte'])
|
||||
scraper.get_profile(channel=channel)
|
||||
@@ -1,3 +1,5 @@
|
||||
import pytest
|
||||
|
||||
from cisticola.base import Channel
|
||||
from cisticola.scraper import YoutubeScraper
|
||||
|
||||
@@ -14,3 +16,10 @@ def test_scrape_youtube_channel(controller, channel_kwargs):
|
||||
channels = [Channel(**channel_kwargs['youtube'])]
|
||||
controller.register_scraper(scraper = YoutubeScraper())
|
||||
controller.scrape_channels(channels = channels, archive_media = True)
|
||||
|
||||
@pytest.mark.profile
|
||||
def test_scrape_youtube_profile(channel_kwargs):
|
||||
|
||||
scraper = YoutubeScraper()
|
||||
channel = Channel(**channel_kwargs['youtube'])
|
||||
scraper.get_profile(channel=channel)
|
||||
Reference in New Issue
Block a user