From 054f029a3406960899a1b42abc9c3e5f9e0fcb9e Mon Sep 17 00:00:00 2001 From: jake Date: Wed, 6 Nov 2024 12:22:09 -0800 Subject: [PATCH] "count" param cannot be sent with user_aggs queries to advanced search --- .pre-commit-config.yaml | 2 +- internetarchive/search.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 415f3c52..3e2e886c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v5.0.0 hooks: - id: check-builtin-literals - id: check-executables-have-shebangs diff --git a/internetarchive/search.py b/internetarchive/search.py index c84c93f7..f1b1a300 100644 --- a/internetarchive/search.py +++ b/internetarchive/search.py @@ -211,6 +211,7 @@ def _make_results_generator(self): def _user_aggs(self): """Experimental support for user aggregations. """ + del self.params['count'] # advanced search will error if this param is present! self.params['page'] = '1' self.params['rows'] = '1' self.params['output'] = 'json'