InstaPy / InstaPy

📷 Instagram Bot - Tool for automated Instagram interactions
GNU General Public License v3.0
16.86k stars 3.78k forks source link

Instapy conection error #6596

Open Brendovsky opened 2 years ago

Brendovsky commented 2 years ago

Current Behavior

C:\Users\brend\Desktop>python script.py.py InstaPy Version: 0.6.16 .. .. .. .. .. .. .. .. ._. Workspace in use: "C:/Users/brend/InstaPy" 1452kb [00:00, 6598.40kb/s] OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO INFO [2022-04-28 19:16:48] [xxxxx] Session started! oooooooooooooooooooooooooooooooooooooooooooooooooooooo INFO [2022-04-28 19:16:48] [xxxxxx] -- Connection Checklist [1/2] (Internet Connection Status) WARNING [2022-04-28 19:16:52] [xxxxxx] - Internet Connection Status: error ...................................................................................................................... CRITICAL [2022-04-28 19:16:52] [xxxxxx] Unable to login to Instagram! You will find more information in the logs above. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' INFO [2022-04-28 19:16:52] [xxxxxx] -- Connection Checklist [1/2] (Internet Connection Status) WARNING [2022-04-28 19:16:53] [xxxxxx] - Internet Connection Status: error ...................................................................................................................... CRITICAL [2022-04-28 19:16:53] [xxxxxx] Unable to login to Instagram! You will find more information in the logs above. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ERROR [2022-04-28 19:16:53] [xxxxxx] You have too few comments, please set at least 10 distinct comments to avoid looking suspicious.

INFO [2022-04-28 19:18:10] [xxxxxx] Sessional Live Report: |> No any statistics to show

[Session lasted 1.57 minutes] OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO INFO [2022-04-28 19:18:10] [xxxxxx] Session ended! ooooooooooooooooooooooooooooooooooooooooooooooooooooo

Possible Solution (optional)

I changed login_util.py like recommended

check connection status

try:
    logger.info("-- Connection Checklist [1/2] (Internet Connection Status)")
    browser.get("view-source:http://ip-api.com/json/")
    pre = browser.find_element(By.TAG_NAME, "pre").text
    current_ip_info = json.loads(pre)
    if (
        proxy_address is not None
        and socket.gethostbyname(proxy_address) != current_ip_info["ip"]
    ):
        logger.warning("- Proxy is set, but it's not working properly")
        logger.warning(
            '- Expected Proxy IP is "{}", and the current IP is "{}"'.format(
                proxy_address, current_ip_info["ip"]
            )
        )
        logger.warning("- Try again or disable the Proxy Address on your setup")
        logger.warning("- Aborting connection...")
        return False
    else:
        logger.info("- Internet Connection Status: ok")
        logger.info(
            '- Current IP is "{}" and it\'s from "{}/{}"'.format(
                #current_ip_info["ip"],
                #current_ip_info["country_name"],
                #current_ip_info["country_code"],
                current_ip_info["query"],
                current_ip_info["country"],
                current_ip_info["countryCode"],

How fix it? tks.

ashardaniyal12 commented 2 years ago

Did you resolved it?

Brendovsky commented 2 years ago

Did you resolved it? No 😭😭

elmissouri16 commented 2 years ago

the issue on this part just disable the connection by commenting the logic on it and make it simply return True or rewrite check with different API or something else and should work https://github.com/InstaPy/InstaPy/blob/4358bea5184e7bb17a34eab813799e31b537e97b/instapy/login_util.py#L173

alexoneill96 commented 2 years ago

Any luck with this? I'm getting the exact same error?

Brendovsky commented 2 years ago

Any luck with this? I'm getting the exact same error? So far I haven't found any solution.

Tr1pke commented 2 years ago

nope doesn't work for me

Luen commented 2 years ago

6592

Brendovsky commented 2 years ago

6592

Does not work for me. T-T

rareshm3 commented 2 years ago

it worked for me, thanks

jbothner21 commented 2 years ago

6592

Does not work for me either

mikestan commented 2 years ago

6592

Does not work for me either

Did not work for me either 🤔

ksyp-7 commented 2 years ago

Having same issue, how to fix?

6592

MURPHYMILTON commented 2 years ago

if you add a proxy will it work?
Page Not Found Looks like you've followed a broken link or entered a URL that doesn't exist on this site.

Back to our site

kevb10 commented 2 years ago

For those still having issues, make the changes above, build and install locally. Follow the instructions here or