I'm not familiar with Python so I'm not sure how to debug this issue. Please excuse my ignorance.
When I run the program from followers.py, everything is fine up until right after the Chrome window opens and instagram.com is loaded. Once I get there, the window closes and the program stops.
Initializing WebDriver Manager
--------------------------------
====== WebDriver manager ======
Current google-chrome version is 97.0.4692
Get LATEST chromedriver version for 97.0.4692 google-chrome
Driver [/Users/akbowen/.wdm/drivers/chromedriver/mac64/97.0.4692.71/chromedriver] found in cache
/Users/akbowen/Downloads/instagramUnfollowers-master/followers.py:10: DeprecationWarning: executable_path has been deprecated, please pass in a Service object
self.driver = webdriver.Chrome(ChromeDriverManager().install())
--------------------------------
WebDriver Manager successfully initialized.
Traceback (most recent call last):
File "/Users/akbowen/Downloads/instagramUnfollowers-master/followers.py", line 122, in <module>
my_bot = InstaUnfollowers(username, password)
File "/Users/akbowen/Downloads/instagramUnfollowers-master/followers.py", line 17, in __init__
accept_all_btn = self.driver.find_element(By.CLASS_NAME, 'bIiDR')
File "/Users/akbowen/Downloads/instagramUnfollowers-master/env/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 1244, in find_element
return self.execute(Command.FIND_ELEMENT, {
File "/Users/akbowen/Downloads/instagramUnfollowers-master/env/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 424, in execute
self.error_handler.check_response(response)
File "/Users/akbowen/Downloads/instagramUnfollowers-master/env/lib/python3.10/site-packages/selenium/webdriver/remote/errorhandler.py", line 247, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":".bIiDR"}
(Session info: chrome=97.0.4692.99)
Stacktrace:
0 chromedriver 0x0000000105443e69 chromedriver + 5160553
1 chromedriver 0x00000001053ce593 chromedriver + 4679059
2 chromedriver 0x0000000104f822c8 chromedriver + 172744
3 chromedriver 0x0000000104fb7b62 chromedriver + 392034
4 chromedriver 0x0000000104fb7d21 chromedriver + 392481
5 chromedriver 0x0000000104fea304 chromedriver + 598788
6 chromedriver 0x0000000104fd53fd chromedriver + 513021
7 chromedriver 0x0000000104fe80ab chromedriver + 589995
8 chromedriver 0x0000000104fd5623 chromedriver + 513571
9 chromedriver 0x0000000104faadce chromedriver + 339406
10 chromedriver 0x0000000104fac105 chromedriver + 344325
11 chromedriver 0x00000001053ff23e chromedriver + 4878910
12 chromedriver 0x0000000105416d17 chromedriver + 4975895
13 chromedriver 0x000000010541ca3f chromedriver + 4999743
14 chromedriver 0x000000010541761a chromedriver + 4978202
15 chromedriver 0x00000001053f3bb1 chromedriver + 4832177
16 chromedriver 0x0000000105433fd8 chromedriver + 5095384
17 chromedriver 0x0000000105434161 chromedriver + 5095777
18 chromedriver 0x000000010544b2a8 chromedriver + 5190312
19 libsystem_pthread.dylib 0x00007ff8059ed4f4 _pthread_start + 125
20 libsystem_pthread.dylib 0x00007ff8059e900f thread_start + 15
I hope this is helpful in solving the issue.