From bcbe788b30e79fc90d2233af9194e80cb0c9852c Mon Sep 17 00:00:00 2001 From: Linas Purinis Date: Wed, 2 Feb 2022 11:47:34 +0200 Subject: [PATCH] adding /json to the end of url --- modules/mdblist.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/mdblist.py b/modules/mdblist.py index 934e1fd4..1a12cfed 100644 --- a/modules/mdblist.py +++ b/modules/mdblist.py @@ -52,6 +52,8 @@ class Mdblist: logger.info(f"Processing Mdblist.com List: {data['url']}{limit_status}") parsed_url = urlparse(data["url"]) url_base = parsed_url._replace(query=None).geturl() + url_base = url_base if url_base.endswith("/") else f"{url_base}/" + url_base = url_base if url_base.endswith("json/") else f"{url_base}json/" params = {"limit": data["limit"]} if data["limit"] > 0 else None return [(i["imdb_id"], "imdb") for i in self.config.get_json(url_base, headers=headers, params=params)] else: