diff --git a/repo2docker/contentproviders/ckan.py b/repo2docker/contentproviders/ckan.py index 9c74afdf..2618fd06 100644 --- a/repo2docker/contentproviders/ckan.py +++ b/repo2docker/contentproviders/ckan.py @@ -1,6 +1,6 @@ from datetime import datetime, timedelta, timezone from os import path -from urllib.parse import parse_qs, urlparse, urlencode +from urllib.parse import parse_qs, urlencode, urlparse from requests import Session @@ -89,11 +89,13 @@ def fetch(self, spec, output_dir, yield_output=False): # handle the activites if activity_id: - fetch_url = ( - f"{spec['api_url']}activity_data_show?" + urlencode({"id": activity_id, "object_type": "package"}) + fetch_url = f"{spec['api_url']}activity_data_show?" + urlencode( + {"id": activity_id, "object_type": "package"} ) else: - fetch_url = f"{spec['api_url']}package_show?" + urlencode({"id": dataset_id}) + fetch_url = f"{spec['api_url']}package_show?" + urlencode( + {"id": dataset_id} + ) resp = self.urlopen( fetch_url,