diff --git a/backend-python/media_impact_monitor/data_loaders/news_online/mediacloud_.py b/backend-python/media_impact_monitor/data_loaders/news_online/mediacloud_.py index eee7dcce..45ddf38e 100644 --- a/backend-python/media_impact_monitor/data_loaders/news_online/mediacloud_.py +++ b/backend-python/media_impact_monitor/data_loaders/news_online/mediacloud_.py @@ -24,9 +24,7 @@ def get_mediacloud_counts( end_date: pd.Timestamp = end, countries: list | None = None, ): - raise NotImplementedError("This function does not currently work.") - assert len(countries) == 1, "Currently only supports one country at a time." - collection_ids: list[str] = [] + collection_ids: list[int] = [] if countries: collection_ids = [] for country in countries: @@ -39,7 +37,6 @@ def get_mediacloud_counts( query=query, start_date=start_date.to_pydatetime().date(), end_date=end_date.to_pydatetime().date(), - # There seems to be a bug in the library relating to `collection_ids`: collection_ids=collection_ids, ) df = pd.DataFrame(data) diff --git a/backend-python/media_impact_monitor/data_loaders/news_online/mediacloud_test.py b/backend-python/media_impact_monitor/data_loaders/news_online/mediacloud_test.py index ca295699..7ba04e41 100644 --- a/backend-python/media_impact_monitor/data_loaders/news_online/mediacloud_test.py +++ b/backend-python/media_impact_monitor/data_loaders/news_online/mediacloud_test.py @@ -1,11 +1,9 @@ import pandas as pd -import pytest from media_impact_monitor.data_loaders.news_online.mediacloud_ import ( get_mediacloud_counts, ) -@pytest.mark.skip(reason="There are some bugs with the mediacloud library.") def test_get_counts_mediacloud(): df = get_mediacloud_counts( "Fridays for Future",