ohld / igbot

🐙 Free scripts, bots and Python API wrapper. Get free followers with our auto like, auto follow and other scripts!
https://hikerapi.com/p/N2P6iqiM
Apache License 2.0
4.69k stars 1.47k forks source link

[BUG] cant upload any story #1260

Open egyjs opened 4 years ago

egyjs commented 4 years ago

Describe the bug

Uploading photos is working for me, however, uploading photos to my Instagram story is not. I am not getting any errors i am just left with the console telling me the photo was not uploaded. Please let me know if this is a bug or if I am doing something wrong. I've tried both calling upload_story_photo.py directly from the console with the location of the photo and creating a bot and running bot.upload_story_photo.

Screenshots image

log:

2020-01-24 08:47:57,728 - INFO - Instabot Started
2020-01-24 08:47:57,729 - DEBUG - Loading cookies
2020-01-24 08:47:57,729 - DEBUG - Loading uuids
2020-01-24 08:47:57,729 - INFO - Recovery from society.screen_uuid_and_cookie.json: COOKIE True - UUIDs True - TIMING, DEVICE and ...
- user-agent=Instagram 105.0.0.18.119 Android (28/9.0; 420dpi; 1080x2260; OnePlus; GM1903; OnePlus7; qcom; en_US)
- phone_id=625abb4a-ea97-4e8c-aa3c-405d6eb3542a
- uuid=33cf1beb-a4f0-415b-a1e0-6c0a8b07cc0b
- client_session_id=053cb344-a862-4585-829a-b823549f0742
- device_id=android-8fae5976fac8a021
2020-01-24 08:47:57,730 - INFO - LOGIN FLOW! Just logged-in: False
2020-01-24 08:47:58,974 - DEBUG - POST to endpoint: feed/timeline/ returned response: <Response [200]>
2020-01-24 08:47:59,372 - DEBUG - POST to endpoint: feed/reels_tray/ returned response: <Response [200]>
2020-01-24 08:47:59,382 - INFO - Logged-in successfully as 'society.screen'!
Saving new image w:1080 h:1920 to `/home/fk48k43208g6/public_html/SocietyScreen.hmandilico.com/public/upload/images/google/2020/1/24/Fast-Car-iphone-wallpaper-ilikewallpaper_com.jpg.STORIES.jpg`
2020-01-24 08:48:03,773 - INFO - Photo '/home/fk48k43208g6/public_html/SocietyScreen.hmandilico.com/public/upload/images/google/2020/1/24/Fast-Car-iphone-wallpaper-ilikewallpaper_com.jpg' is not uploaded.
2020-01-24 08:48:03,774 - INFO - Total requests: 21
duplicate-issues[bot] commented 4 years ago

Hey @el3zahaby,

We did a quick check and this issue looks very darn similar to

This could be a coincidence, but if any of these issues solves your problem then I did a good job :smile:

If not, the maintainers will get to this issue shortly.

Cheers, Your Friendly Neighborhood ProBot

egyjs commented 4 years ago

image it was another try but still nothing :(

yurisa2 commented 4 years ago

Yeah.... I have the same issue, any need for further testing or any logs, I'm available

bruvv commented 4 years ago

Please update to the newer version

yurisa2 commented 4 years ago

Please update to the newer version

Did... Before I commented.....

git pull setup.py install

Same results

if it helps, I have a VERY CLEAN account, where I do not get any blocks or anything NEVER, and the results are the same.

bruvv commented 4 years ago

Again big update in the dev branch, please test.

yurisa2 commented 4 years ago

Just checked out the "development" branch and still got the error

2020-01-29 10:57:52,714 - INFO - Photo 'xxxxx.STORIES.jpg' is not uploaded.

yurisa2 commented 4 years ago

is there any debug flag so I can try and help with the solution?!?!? log!? (Sorry I'm new using the lib)

egyjs commented 4 years ago

anything yet ? :(

bruvv commented 4 years ago

@el3zahaby you can try this PR:https://github.com/instagrambot/instabot/pull/1330 but as long as @xenud isn't going to fix the build error's I cannot merge it.

vladlaptev commented 4 years ago

anything yet ? :(

Fixed this bug by looking at other libraries, that I found in github!

They uploading photo for story to endpoint which contains "rupload_igphoto" (not to "upload/photo/" as we have in this bot), and the photo is uploaded without any problems with this endpoint. After that, we go further by the standard flow - configure_story.

2020-03-03 00:24:11,167 - INFO - LOGIN FLOW! Just logged-in: False 2020-03-03 00:24:16,877 - INFO - Logged-in successfully as 'vladlaptev'! Image is already 1080x1920. Just converting image. 200 {"upload_id": "1583187858484", "xsharing_nonces": {}, "status": "ok"} 2020-03-03 00:24:22,800 - INFO - Photo '/home/vlad/Downloads/test2.jpg.STORIES.jpg' is uploaded as Story. 2020-03-03 00:24:22,800 - INFO - Total requests: 36

P.S. I don’t know how this solution correct this is (from the point of view of the instagram, how much this differs from the standard workflow of the application). If I get a ban - I'll left message here.

This method also works for posting stories with metadata (countdown, poll, question, etc). Just add metadata in the request data in configure_story function. Would be great if someone fix this and make PR.

EightShift commented 4 years ago

i have same problem @ohld

egyjs commented 4 years ago

@vladlaptev ,, sorry i didn't get you can you send an example of your code PLS

vladlaptev commented 4 years ago

@vladlaptev ,, sorry i didn't get you can you send an example of your code PLS

https://gist.github.com/vladlaptev/090520a42fdcb4a4c69c1016686d98cb

Most of this code copied from api_photo.py. Look at the difference between line 111 and 118 and the nearest code.

It's works now at real production project. But I still doesn't know good solution it is or not.

In other libraries, I found that this path is also using to upload history.

Because it's just simple uploading photo to instagram servers, after that we getting upload_id of photo, which is using to configure this photo story at function "configure_story" and sending request to "media/configure_to_story/" to post story.

bruvv commented 4 years ago

Can you make a pull request @vladlaptev ? I'll merge it.

therajar commented 4 years ago

What is the last update on this guys? @bruvv @vladlaptev ?