Log cfg name with url.

This commit is contained in:
dotnet 2023-10-13 18:14:03 -04:00
parent 20634459f0
commit 7cb49e51a7
1 changed files with 1 additions and 1 deletions

View File

@ -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