Closed ayush3298 closed 6 years ago
@ayush3298 You are forget to add
bot.login(username="user", password="pass")
after bot = Bot()
It download some photos and after some photos it shows that error. And I logged in
@ayush3298 can you write me in telegram? https://t.me/sudoguy
i have same problem
usage: download_photos_by_user.py [-h] username download_photos_by_user.py: error: the following arguments are required: username
this is the error
Please follow the guide below
x
into all the boxes [ ] relevant to your issue (like so [x]).Before submitting an issue, make sure you have:
Purpose of your issue?
The following sections requests more details for particular types of issues, you can remove any section (the contents between the triple ---) not applicable to your issue.
For a bug report, you must include the Python version used, code that will reproduce the error, and the error log/traceback.
Paste the output of
python -V
here:Code:
Error/Debug Log:
Describe your issue
whenever i tries to download media by a user it shows me this
2018-01-05 12:52:06,102 - INFO - Going to download 158 medias.
0%| | 0/158 [00:00<?, ?it/s] 1%| | 1/158 [00:03<09:48, 3.75s/it] 1%|1 | 2/158 [00:07<10:09, 3.91s/it] 2%|1 | 3/158 [00:10<09:15, 3.58s/it] 3%|2 | 4/158 [00:14<09:34, 3.73s/it] 3%|3 | 5/158 [00:17<09:04, 3.56s/it]Traceback (most recent call last): File "C:\Users\ADMIN\Google Drive\python\my_programms\instabot-master\examples\download_photos_by_user.py", line 19, in
bot.download_photos(medias)
File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python36-32\lib\site-packages\instabot\bot\bot.py", line 348, in download_photos
return download_photos(self, medias, path, description)
File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python36-32\lib\site-packages\instabot\bot\bot_photo.py", line 39, in download_photos
if not self.download_photo(media, path, description=description):
File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python36-32\lib\site-packages\instabot\bot\bot.py", line 345, in download_photo
return download_photo(self, media_id, path, filename, description)
File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python36-32\lib\site-packages\instabot\bot\bot_photo.py", line 25, in download_photo
photo = super(self.class, self).downloadPhoto(media_id, filename, False, path)
File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python36-32\lib\site-packages\instabot\api\api.py", line 198, in downloadPhoto
return downloadPhoto(self, media_id, filename, media, path)
File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python36-32\lib\site-packages\instabot\api\api_photo.py", line 18, in downloadPhoto
images = media['image_versions2']['candidates']
KeyError: 'image_versions2'