ozanyurtsever / instagram_unfollower

A Python script to unfollow users who you follow but they don't follow you back on Instagram. Works with Selenium, without using Instagram API.
MIT License
49 stars 20 forks source link

ValueError: invalid literal for int() with base 10 #2

Open cyborg2006 opened 4 years ago

cyborg2006 commented 4 years ago

"ValueError: invalid literal for int() with base 10"

Code login to instagram without problem, "following" pop-up is opened and code halt with above comment. Any solution?

ParisBG commented 3 years ago

If you have over 999 followers, the number will be displayed with a comma i.e 1,000. You just need to find a way to convert that string (with the comma) into int format.

ghost commented 3 years ago

You just need to find a way to convert that string (with the comma) into int format.

Hey, do you know how to do this? Thanks

ParisBG commented 3 years ago

Yes, if you are using Python...

import time import locale

locale.setlocale( locale.LC_ALL, 'en_US.UTF-8' )

//Make sure the number is in text/string format and wrap it in this function call and you will get back a proper int

myBigInt = locale.atoi(the number with a comma)

On Sat, May 15, 2021 at 2:54 PM RushingAura @.***> wrote:

You just need to find a way to convert that string (with the comma) into int format.

Hey, do you know how to do this? Thanks

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ozanyurtsever/instagram_unfollower/issues/2#issuecomment-841715827, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKHSTQRSZV2UTFDGGDY4PNLTN3GNXANCNFSM4PH6MMJQ .