login error
python 3.9 Code: from instabot import Bot bot = Bot() bot.login(username="username", password="password")
error is: ds_user
and, for the first time, it logged in correctly. for the second time it throws error
I ran into this same issue. For me the solution that worked was deleting the config directory that gets created on bot.login(). For some reason the data stored in this directory is not aligned with the api and throws the ds_user error.
Add this code top of your file:
import os
import glob
cookie_del = glob.glob("config/*cookie.json")
os.remove(cookie_del[0])
import os import glob cookie_del = glob.glob("config/*cookie.json") os.remove(cookie_del[0])
This is not working for me. I had to put it into try, except because then I would have index error. But I still get 429 errors.
これと同じ問題に遭遇しました。私にとってうまくいった解決策は、bot.login() で作成される config ディレクトリを削除することでした。何らかの理由で、このディレクトリに保存されているデータは API と一致していないため、ds_user エラーがスローされます。
`import shutil
Instabotを初期化
from instabot import Bot my_bot = Bot()
ログインを試行し、configディレクトリを作成
my_bot.login(username="YourUsername", password="YourPassword")
configディレクトリを再帰的に削除
shutil.rmtree('config') ` I have the same problem. Is this what you mean?