stanvanrooy / instauto

Simple to use wrapper around the private Instagram API, written in Python.
https://instauto.readthedocs.io
MIT License
103 stars 24 forks source link

profile_set_picture works as image post #156

Closed phlaskoo closed 3 years ago

phlaskoo commented 3 years ago

I use bellow code to update profile picture: (windows 10 , python 3.9 , latest instauto on github) post=structs.post.PostFeed(pic_path,'profile picture') response=self.client.post_post(post,80) upload_id=response.json()['media']['id'] action=profile.SetPicture(upload_id) status=self.client.profile_set_picture(action)

but this code only upload profile image as a post with caption ('profile picture') and also delete my bio (super weird why??) the error that returns at the end is this:

Traceback (most recent call last): File "<pyshell#0>", line 1, in m.SET_PICTURE('background.jpg') File "C:/Users/Hosseinpour/Desktop/instabot/instabot2.py", line 56, in SET_PICTURE status=self.client.profile_set_picture(action) File "C:\Users\Hosseinpour\AppData\Local\Programs\Python\Python39\lib\site-packages\instauto\api\actions\profile.py", line 49, in profile_set_picture return self._request("accounts/change_profile_picture/", Method.POST, body=data) File "C:\Users\Hosseinpour\AppData\Local\Programs\Python\Python39\lib\site-packages\instauto\api\actions\request.py", line 60, in _request self._check_response_for_errors(resp) File "C:\Users\Hosseinpour\AppData\Local\Programs\Python\Python39\lib\site-packages\instauto\api\actions\request.py", line 105, in _check_response_for_errors raise BadResponse("Received a non-200 response from Instagram") instauto.api.exceptions.BadResponse: Received a non-200 response from Instagram

stanvanrooy commented 3 years ago

See the updated example.

phlaskoo commented 3 years ago

Got it, thanks! but still bio get empty after updating profile picture (not important at all) nice job

On Fri, May 7, 2021 at 1:36 PM Stan van Rooy @.***> wrote:

See the updated example.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/stanvanrooy/instauto/issues/156#issuecomment-834194163, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI2MUCELJPAB5SB7LZDFQYTTMOUQ5ANCNFSM44H5QO4Q .

stanvanrooy commented 3 years ago

Could you also open a separate issue for that behaviour? Thanks!  -------- Oorspronkelijk bericht --------Van: phlaskoo @.> Datum: 08-05-2021 13:36 (GMT+01:00) Aan: stanvanrooy/instauto @.> Cc: Stan van Rooy @.>, State change @.> Onderwerp: Re: [stanvanrooy/instauto] profile_set_picture works as image post (#156)

Got it, thanks!

but still bio get empty after updating profile picture (not important at

all)

nice job

On Fri, May 7, 2021 at 1:36 PM Stan van Rooy @.***>

wrote:

See the updated example.

You are receiving this because you authored the thread.

Reply to this email directly, view it on GitHub

https://github.com/stanvanrooy/instauto/issues/156#issuecomment-834194163,

or unsubscribe

https://github.com/notifications/unsubscribe-auth/AI2MUCELJPAB5SB7LZDFQYTTMOUQ5ANCNFSM44H5QO4Q

.

—You are receiving this because you modified the open/close state.Reply to this email directly, view it on GitHub, or unsubscribe.