Esempio n. 1
0
def upload_image_to_story(client: ApiClient, image_path: str) -> bool:
    """Upload an image to your story.

    Args:
        client: your `ApiClient`
        image_path: path to the image to upload

    Returns:
        `True` if success else `False`
    """
    post = ps.PostStory(path=image_path)
    resp = client.post_post(post)
    logger.info(f"Uploaded image to story")
    return is_resp_ok(resp)
Esempio n. 2
0
import os

from instauto.api.client import ApiClient
from instauto.api.actions import post as ps

if __name__ == '__main__':
    if os.path.isfile('./.instauto.save'):
        client = ApiClient.initiate_from_file('./.instauto.save')
    else:
        client = ApiClient(username=os.environ.get("INSTAUTO_USER")
                           or "your_username",
                           password=os.environ.get("INSTAUTO_PASS")
                           or "your_password")
        client.log_in()
        client.save_to_disk('./.instauto.save')

    post = ps.PostStory(path='./test_story.jpg', )
    resp = client.post_post(post, 80)
    print("Success: ", resp.ok)
Esempio n. 3
0
img


# In[454]:



post = ps.PostFeed(
    path=name,
    caption=caption
)
resp = client.post_post(post, 80)
print("Success: ", resp.ok)

post = ps.PostStory(
    path=storyname,
)
resp = client.post_post(post, 80)
print("Success: ", resp.ok)


# In[399]:





# In[405]:


Esempio n. 4
0
def upload_image_to_story(client: ApiClient, image_path: str) -> bool:
    post = ps.PostStory(path=image_path)
    resp = client.post_post(post)
    logger.info(f"Uploaded image to story")
    return is_resp_ok(resp)
Esempio n. 5
0
def upload_image_to_story(client: ApiClient, image_path: str) -> bool:
    post = ps.PostStory(path=image_path)
    resp = client.post_post(post)
    return is_resp_ok(resp)