b3nab / instapy-cli

:sparkles: Python library and CLI to upload photo and video on Instagram. W/o a phone!
MIT License
601 stars 98 forks source link

changing username does not change ig.json #44

Closed BimBimSalaBim closed 5 years ago

BimBimSalaBim commented 5 years ago

I wanted to use the API to upload to two different accounts and when I set it all up both of the scripts used the same ig.json file. so it would just upload to the first account since that was the one that created the JSON file. I have a workaround for it so I just rename the files at the start and end of the script but, I feel like there should be a way to change the name of the JSON file in the API or set the location of it as currently even though both scripts are in different folders the JSONfile used is in the home folder.

AKwoKWH commented 5 years ago

Having the same issue here. The script check use the cookies first, and only login using pw when cookies not available. So, it always upload to the first account.

I was searching the fix then I see your post. Clever idea to rename the file.

pimboli commented 5 years ago

having the same issue. @developper: idea, name the ig.json USERNAME.json and use always the JSON file related to the Instagram username.

Please include this fix in the next release :)

BimBimSalaBim commented 5 years ago

@AKwoKWH @pimboli @b3nab @ohld I have submitted a pull request/change that fixes this problem could you guys check it out and see if it works properly? Thanks! (it worked for me but need to make sure it works for others.)

AKwoKWH commented 5 years ago

do you got a typo?

image

BimBimSalaBim commented 5 years ago

Yes! This is why I wanted one to check it, I will fix it when I get home.

AKwoKWH commented 5 years ago

41

[https://github.com/instagrambot/instapy-cli/issues/41]

I suggest we can combine this together too. say we can add a parameter input for the config file where user can pass the full path of the file (or by default = username + '_ig.json' in the same directory)

BimBimSalaBim commented 5 years ago

It doesn't seem like it will be hard as it should be just adding the path to the default directory I'll see if I can add it later on

b3nab commented 5 years ago

I approved the PR submitted by @BimBimSalaBim , thanks! I'm not closing this issue as this fix for instapy-cli is not already released.

I will close this on release.