Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Added upload_image functionality#307

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
kn0wm4d wants to merge6 commits intoping:master
base:master
Choose a base branch
Loading
fromkn0wm4d:upload_functionality

Conversation

kn0wm4d
Copy link

@kn0wm4dkn0wm4d commentedOct 21, 2020
edited
Loading

What does this PR do?

Added upload_image functionality for both posts and stories

from PIL import Imagefrom instagram_private_api import Clientapi = Client(username=...,password=...)with Image.open('/Users/kn0wm4d/Desktop/test.jpg') as img:   photo_data = open('/Users/kn0wm4d/Desktop/test.jpg', 'rb')   width, height = img.size   size = (width, height)api.upload_image(photo_data, quality=80, size=size, caption='Test', story=False)

Why was this PR needed?

Because IG deprecated post_photo (experimental endpoint).

What are the relevant issue numbers?

#305

Does this PR meet the acceptance criteria?

  • Passes flake8 (refer to.travis.yml)
  • Docs are buildable
  • Branch has no merge conflicts withmaster
  • Is covered by a test

@kn0wm4dkn0wm4d changed the titleAdded upload_photo methodAdded upload_image functionalityOct 21, 2020
@MrTob
Copy link

the upload_image functionality returns a 500 HTTP Error

urllib.error.HTTPError: HTTP Error 500: Internal Server Error

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@kn0wm4d@MrTob

[8]ページ先頭

©2009-2025 Movatter.jp