redianmarku / instagram-follower-scraper

A python script that can automatically scrape other people followers on instagram and save them in a txt file.
230 stars 83 forks source link

Can `t run scraper #25

Open waffarly opened 1 year ago

waffarly commented 1 year ago

C:\Users\Amr Mohamed\Downloads\instagram-follower-scraper-master\instagram-follower-scraper-master\run.py:32: DeprecationWarning: executable_path has been deprecated, please pass in a Service object bot = webdriver.Chrome(executable_path=CM().install(), options=options)

DevTools listening on ws://127.0.0.1:62036/devtools/browser/d22bd391-890c-437f-8f2b-9be905be57dc [Info] - Instagram did not require to accept cookies this time. [Info] - Logging in... Traceback (most recent call last): File "C:\Users\Amr Mohamed\Downloads\instagram-follower-scraper-master\instagram-follower-scraper-master\run.py", line 111, in scrape() File "C:\Users\Amr Mohamed\Downloads\instagram-follower-scraper-master\instagram-follower-scraper-master\run.py", line 62, in scrape username.send_keys(USERNAME) File "C:\Users\Amr Mohamed\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webelement.py", line 232, in send_keys Command.SEND_KEYS_TO_ELEMENT, {"text": "".join(keys_to_typing(value)), "value": keys_to_typing(value)} ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Amr Mohamed\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\common\utils.py", line 140, in keys_to_typing for i in range(len(val)): ^^^^^^^^ TypeError: object of type 'NoneType' has no len()

waffarly commented 1 year ago

I have the above message when I run the command paython run.py and exactly after opening the Instagram window and before logging into the account.

rnnnnn commented 1 year ago

You should check if the USERNAME and PASSWORD variable is properly defined and assigned a value. So you can edit https://github.com/redianmarku/instagram-follower-scraper/blob/master/run.py#L12

USERNAME = 'your_instagram_username'
PASSWORD = 'your_instagram_password'

You can edit the USERNAME and PASSWORD variables and change them to your account credentials.

Aeromzx commented 1 year ago

I got the Same issue, username and password is set!

Traceback (most recent call last):
  File "F:\instagram-follower-scraper-master\run.py", line 112, in <module>
    scrape()
  File "F:\instagram-follower-scraper-master\run.py", line 63, in scrape
    username.send_keys(USERNAME)
  File "C:\Users\[NOOOOO]\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webelement.py", line 232, in send_keys
    Command.SEND_KEYS_TO_ELEMENT, {"text": "".join(keys_to_typing(value)), "value": keys_to_typing(value)}
                                                   ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\[NOOOOO]\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\common\utils.py", line 140, in keys_to_typing
    for i in range(len(val)):
                   ^^^^^^^^
rnnnnn commented 1 year ago

You can print these two variables to ensure they are of the correct format and type.

print(USERNAME)
print(PASSWORD)
waffarly commented 1 year ago

Everything is right and in place. The same problem occurs.

[Info] - Instagram did not require to accept cookies this time. [Info] - Logging in... Traceback (most recent call last): File "C:\Users\Amr Mohamed\Downloads\instagram-follower-scraper-master\instagram-follower-scraper-master\run.py", line 112, in scrape() File "C:\Users\Amr Mohamed\Downloads\instagram-follower-scraper-master\instagram-follower-scraper-master\run.py", line 63, in scrape username.send_keys(USERNAME) File "C:\Users\Amr Mohamed\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webelement.py", line 232, in send_keys Command.SEND_KEYS_TO_ELEMENT, {"text": "".join(keys_to_typing(value)), "value": keys_to_typing(value)} ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Amr Mohamed\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\common\utils.py", line 140, in keys_to_typing for i in range(len(val)): ^^^^^^^^ TypeError: object of type 'NoneType' has no len()