Log time with url
This commit is contained in:
parent
2eadecdaac
commit
20634459f0
|
@ -63,7 +63,7 @@ class BotInstance:
|
||||||
else:
|
else:
|
||||||
gelbooru_tags_exclude = ""
|
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()
|
gelbooru_json = requests.get(self.gelbooru_url + urllib.parse.quote_plus(self.gelbooru_tags + gelbooru_tags_exclude) + "&pid=" + str(page_number)).json()
|
||||||
print ("Gelbooru Url: %s" % (self.gelbooru_url + urllib.parse.quote_plus(self.gelbooru_tags + gelbooru_tags_exclude) + "&pid=" + str(page_number)), file=self.log_file)
|
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)
|
||||||
max_pages = gelbooru_json['@attributes']['count'] // 100 + (1 if gelbooru_json['@attributes']['count'] % 100 != 0 else 0)
|
max_pages = gelbooru_json['@attributes']['count'] // 100 + (1 if gelbooru_json['@attributes']['count'] % 100 != 0 else 0)
|
||||||
if max_pages > 200:
|
if max_pages > 200:
|
||||||
max_pages = 200
|
max_pages = 200
|
||||||
|
|
Loading…
Reference in New Issue