示例#1
0
import os

from instauto.api.client import ApiClient

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')

    client.change_password("new_password", "old_password")
示例#2
0
from instauto.api.client import ApiClient

# note: to change your password, instauto needs the current password. If you've initialized
# the client from your username and password, it'll be able to get it from there, but if
# you initialized the client from a save file, you'll need to provide it yourself, since
# instauto does not store your password in the save file.

client = ApiClient(username="******", password="******")
client.change_password("new_password")
# or
client = ApiClient.initiate_from_file('.instauto.save')
client.change_password("new_password", "current_password")