Snbig / InstaTrack

Convert Instagram user ID to username & vice versa
MIT License
108 stars 32 forks source link

[Enchancment] Ability to pass a .txt file #3

Closed ghost closed 4 years ago

ghost commented 5 years ago

Hi, Could you add an argument so it would be possible to pass a .txt file containing id numbers of instagram users (one in each line) ? The script would produce a .txt of usernames

ghost commented 5 years ago

And please add a timeout between each api call

Snbig commented 5 years ago

Hi, Could you add an argument so it would be possible to pass a .txt file containing id numbers of instagram users (one in each line) ? The script would produce a .txt of usernames

Thank you for your suggestion ❤

List lookup add to code https://github.com/Snbig/InstaTrack/commit/3cc98829657fada307e6e46cdd1f563a2c4204d7

Snbig commented 5 years ago

And please add a timeout between each api call

Is there any limitation on Instagram API call? I don't understand why you need to set timeout for api call.

github-userx commented 5 years ago

@Snbig you’re the best for all these updates!! <3

ghost commented 5 years ago

@Snbig Thanks for the quick update. Yep, there’s a limit on instagrap api calls, and I’m not sure what is it. You can try to call some functions 2000 times without timeout, and you will get a messege from instagram “ an error occured please try again later”. By the way, could add anothet option to export the results as an excel file? First coloumn with user id, and second one with the username

ghost commented 5 years ago

The script crashed on second run. I though I would test what would happen if you enter a some active user ids in .txt file and mix those with a user id of temporarily deactivated account. Here's my input file:

input.txt:

8163012263 11216025632

command used

python InstaTracker.py -f input.txt

output:

C:\Users\Test\Desktop>python InstaTracker.py -f input.txt Traceback (most recent call last): File "InstaTracker.py", line 112, in main() File "InstaTracker.py", line 75, in main username = useridToUsername(e) File "InstaTracker.py", line 45, in useridToUsername username = json.loads(r3)['data']['user']['reel']['user']['username'] TypeError: 'NoneType' object is not subscriptable

ghost commented 5 years ago

@Snbig any idea why it crashed?