From 7cb49e51a76e4958f2169d1639b8b5e256a5c4fc Mon Sep 17 00:00:00 2001 From: dotnet Date: Fri, 13 Oct 2023 18:14:03 -0400 Subject: [PATCH] Log cfg name with url. --- gelbooru_poster.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gelbooru_poster.py b/gelbooru_poster.py index b744615..6ef0814 100644 --- a/gelbooru_poster.py +++ b/gelbooru_poster.py @@ -63,7 +63,7 @@ class BotInstance: else: gelbooru_tags_exclude = "" gelbooru_json = requests.get(self.gelbooru_url + urllib.parse.quote_plus(self.gelbooru_tags + gelbooru_tags_exclude) + "&pid=" + str(page_number)).json() - print ("[%s] Gelbooru Url: %s" % (time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()), self.gelbooru_url + urllib.parse.quote_plus(self.gelbooru_tags + gelbooru_tags_exclude) + "&pid=" + str(page_number)), file=self.log_file) + print ("[%s][%s] Gelbooru Url: %s" % (time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()), self.cfg_name, self.gelbooru_url + urllib.parse.quote_plus(self.gelbooru_tags + gelbooru_tags_exclude) + "&pid=" + str(page_number)), file=self.log_file) max_pages = gelbooru_json['@attributes']['count'] // 100 + (1 if gelbooru_json['@attributes']['count'] % 100 != 0 else 0) if max_pages > 200: max_pages = 200