Здравствуйте! Нужно было подключить к боту из библиотеки "instabot" прокси, но ,обновив все до последней версии и действуя по
инструкции ,ничего не вышло, выдает ошибку "AttributeError: 'dict' object has no attribute 'decode'",
pr = "http://user:password@host:port"
PROXY= {
'http_proxy':pr,
'https_proxy':pr
}
bot = Bot()
bot.login(username = Login, password = Password, use_cookie = False, proxy= PROXY)
IdUserList = bot.get_user_following(Login)
Ошибка:
Traceback (most recent call last):
File "main.py", line 81, in <module>
main()
File "main.py", line 74, in main
UsernameList = getUserNameList()
File "main.py", line 26, in getUserNameList
bot.login(username = Login, password = Password, use_cookie = False, proxy= PROXY)
File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\instabot\bot\bot.py", line 443, in login
if self.api.login(**args) is False:
File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\instabot\api\api.py", line 226, in login
self.set_proxy() # Only happens if `self.proxy`
File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\instabot\api\api.py", line 465, in set_proxy
parsed = urllib.parse.urlparse(self.proxy)
File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\urllib\parse.py", line 372, in urlparse
url, scheme, _coerce_result = _coerce_args(url, scheme)
File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\urllib\parse.py", line 124, in _coerce_args
return _decode_args(args) + (_encode_result,)
File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\urllib\parse.py", line 108, in _decode_args
return tuple(x.decode(encoding, errors) if x else '' for x in args)
File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\urllib\parse.py", line 108, in <genexpr>
return tuple(x.decode(encoding, errors) if x else '' for x in args)
AttributeError: 'dict' object has no attribute 'decode'
Подскажите, в чем может быть проблема? Спасибо!