fix
This commit is contained in:
parent
eebf4805a3
commit
76dfae89ad
@ -1,3 +1,4 @@
|
|||||||
|
import json
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
|
|
||||||
import imagehash
|
import imagehash
|
||||||
@ -13,7 +14,7 @@ class Command(BaseCommand):
|
|||||||
def handle(self, *args, **options):
|
def handle(self, *args, **options):
|
||||||
for item in tqdm(QueuedItem.objects.filter(type='photo', image_hash__isnull=True)):
|
for item in tqdm(QueuedItem.objects.filter(type='photo', image_hash__isnull=True)):
|
||||||
bot: Bot = item.config.bot.get_bot()
|
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 = BytesIO()
|
||||||
io.name = 'file.jpg'
|
io.name = 'file.jpg'
|
||||||
file.download(out=io)
|
file.download(out=io)
|
||||||
|
Loading…
Reference in New Issue
Block a user