This commit is contained in:
bakatrouble 2022-08-08 04:19:39 +03:00
parent eebf4805a3
commit 76dfae89ad

View File

@ -1,3 +1,4 @@
import json
from io import BytesIO
import imagehash
@ -13,7 +14,7 @@ class Command(BaseCommand):
def handle(self, *args, **options):
for item in tqdm(QueuedItem.objects.filter(type='photo', image_hash__isnull=True)):
bot: Bot = item.config.bot.get_bot()
file = bot.get_file(item.args[0])
file = bot.get_file(json.loads(item.args)[0])
io = BytesIO()
io.name = 'file.jpg'
file.download(out=io)