Instagram-Bot icon indicating copy to clipboard operation
Instagram-Bot copied to clipboard

Unfortunately does not work

Open UnixCro opened this issue 3 years ago • 4 comments


pip3 install -r requirements.txt

Requirement already satisfied: selenium==3.141.0 in /usr/local/lib/python3.9/site-packages (from -r requirements.txt (line 1)) (3.141.0)
Requirement already satisfied: termcolor==1.1.0 in /usr/local/lib/python3.9/site-packages (from -r requirements.txt (line 2)) (1.1.0)
Requirement already satisfied: colorama==0.3.9 in /usr/local/lib/python3.9/site-packages (from -r requirements.txt (line 3)) (0.3.9)
Requirement already satisfied: urllib3==1.25.3 in /usr/local/lib/python3.9/site-packages (from -r requirements.txt (line 5)) (1.25.3)
Collecting requests==2.22.0
  Downloading requests-2.22.0-py2.py3-none-any.whl (57 kB)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /Users/UnixCro/Library/Python/3.9/lib/python/site-packages (from requests==2.22.0->-r requirements.txt (line 4)) (3.0.4)
Requirement already satisfied: urllib3==1.25.3 in /usr/local/lib/python3.9/site-packages (from -r requirements.txt (line 5)) (1.25.3)
Requirement already satisfied: idna<2.9,>=2.5 in /usr/local/lib/python3.9/site-packages (from requests==2.22.0->-r requirements.txt (line 4)) (2.8)
Requirement already satisfied: certifi>=2017.4.17 in /Users/UnixCro/Library/Python/3.9/lib/python/site-packages (from requests==2.22.0->-r requirements.txt (line 4)) (2020.6.20)
Requirement already satisfied: urllib3==1.25.3 in /usr/local/lib/python3.9/site-packages (from -r requirements.txt (line 5)) (1.25.3)
Installing collected packages: requests
  Attempting uninstall: requests
    Found existing installation: requests 2.25.1
    Uninstalling requests-2.25.1:
      Successfully uninstalled requests-2.25.1
Successfully installed requests-2.22.0


python3 instagram.py

Traceback (most recent call last):
  File "instagram.py", line 3, in <module>
    from selenium import webdriver
ModuleNotFoundError: No module named 'selenium'

python3 -V 
Python 3.8.2

macOS Catalina 10.15.7

UnixCro avatar Jan 05 '21 09:01 UnixCro

I haven't tried it on macOS operating system.

Could you try the instructions on the link below? https://stackoverflow.com/a/31149093/10636297

mustafadalga avatar Jan 05 '21 12:01 mustafadalga

Yeah, so I tried this again

Unfortunately it doesn't seem to work anyway, there must be a problem with selenium or the Python version is not complete

pip3 install selenium

Requirement already satisfied: selenium in /usr/local/lib/python3.9/site-packages (3.141.0)
Requirement already satisfied: urllib3 in /usr/local/lib/python3.9/site-packages (from selenium) (1.25.3)

Do you have any idea?

UnixCro avatar Jan 05 '21 12:01 UnixCro

Now I've found the bug. I looked where pip3 is located, it is located under / usr / local, where Homebrew installs its packages by default. I deleted pip3 and used / usr / bin / pip3 from macOS and thus installed both the requirements.txt and selenium with the parameter --user and it worked.

Instagram bot and author information is displayed, when I entered my username and password, the following message unfortunately came up

[-] Error during user login: 'Instagram' object has no attribute 'driver'

There was also something else

our username >> [-] An error occurred during the browser initialization process:Message: 'C:\geckodriver.exe' executable needs to be in PATH.

C: \ Is only for Windows and unfortunately has nothing to do with macOS

UnixCro avatar Jan 05 '21 13:01 UnixCro

Now I've found the bug. I looked where pip3 is located, it is located under / usr / local, where Homebrew installs its packages by default. I deleted pip3 and used / usr / bin / pip3 from macOS and thus installed both the requirements.txt and selenium with the parameter --user and it worked.

Instagram bot and author information is displayed, when I entered my username and password, the following message unfortunately came up

[-] Error during user login: 'Instagram' object has no attribute 'driver'

There was also something else

our username >> [-] An error occurred during the browser initialization process:Message: 'C:\geckodriver.exe' executable needs to be in PATH.

C: \ Is only for Windows and unfortunately has nothing to do with macOS

Because I ran it in Windows operating system by default.In the error message, it states that the configuration of the geckodriver file is incorrect.

For Mac operating system, you must download the geckodriver software from here and specify the geckodriver file path in the config.json settings file.

The geckodriver file path is defined here in config.json.

mustafadalga avatar Jan 05 '21 13:01 mustafadalga