From 06095202fe08ef07e27875ea080d62e115a5df98 Mon Sep 17 00:00:00 2001 From: Akash Mahanty Date: Mon, 24 Jan 2022 23:35:48 +0530 Subject: [PATCH] BUG FIX : forgot to use the endpoint from the instance and also assign payload to param. Bug caught by the flake8 in the CI tests. --- waybackpy/cdx_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/waybackpy/cdx_api.py b/waybackpy/cdx_api.py index fa60513..5d122f5 100644 --- a/waybackpy/cdx_api.py +++ b/waybackpy/cdx_api.py @@ -57,7 +57,7 @@ class WaybackMachineCDXServerAPI: for i in range(total_pages): payload["page"] = str(i) - url = full_url(endpoint, params) + url = full_url(self.endpoint, params=payload) res = get_response(url, headers=headers) self.last_api_request_url = url @@ -81,7 +81,7 @@ class WaybackMachineCDXServerAPI: if resumeKey: payload["resumeKey"] = resumeKey - url = full_url(endpoint, params) + url = full_url(self.endpoint, params=payload) res = get_response(url, headers=headers) self.last_api_request_url = url