added methods for extracting channel profile metadata, and tests

This commit is contained in:
Tristan Lee
2022-03-28 21:11:34 -05:00
parent ea40ea2640
commit 67d1abf024
14 changed files with 120 additions and 9 deletions

View File

@@ -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)