From b21ac36b27b90a04d6a807eda38c443aca7e8978 Mon Sep 17 00:00:00 2001 From: pykereaper <74609327+pykereaper@users.noreply.github.com> Date: Sat, 28 Jun 2025 23:20:02 +0200 Subject: [PATCH] Fix usage of data.json files from web (#2020) --- maigret/maigret.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/maigret/maigret.py b/maigret/maigret.py index 2935409..665f36f 100755 --- a/maigret/maigret.py +++ b/maigret/maigret.py @@ -520,7 +520,9 @@ async def main(): if args.tags: args.tags = list(set(str(args.tags).split(','))) - db_file = path.join(path.dirname(path.realpath(__file__)), args.db_file) + db_file = args.db_file \ + if (args.db_file.startswith("http://") or args.db_file.startswith("https://")) \ + else path.join(path.dirname(path.realpath(__file__)), args.db_file) if args.top_sites == 0 or args.all_sites: args.top_sites = sys.maxsize