Closed CGalactica closed 2 years ago
@CGalactica
Try changing line 62 from:
acceptCookies = browser.find_element_by_xpath('/html/body/div[4]/div/div/button[1]');
to
acceptCookies = browser.find_element_by_xpath('/html/body/div[4]/div/div/button[2]');
After changing line 62 the browser window spawned but nothing happened at the login screen. Below error was logged to the console. The username and password fields are not being filled in either fyi.
DevTools listening on ws://127.0.0.1:59373/devtools/browser/9eb658fd-052a-43f6-ae43-3473742fd85d
C:\Users\Blake\OneDrive\Desktop\InstagramBot-master\instagramBot.py:62: DeprecationWarning: find_element_by_xpath is deprecated. Please use find_element(by=By.XPATH, value=xpath) instead
acceptCookies = browser.find_element_by_xpath('/html/body/div[4]/div/div/button[2]');
Traceback (most recent call last):
File "C:\Users\Blake\OneDrive\Desktop\InstagramBot-master\instagramBot.py", line 85, in
C:\Users\Blake\OneDrive\Desktop\InstagramBot-master>[8172:4264:0412/195538.715:ERROR:device_event_log_impl.cc(214)] [19:55:38.715] Bluetooth: bluetooth_adapter_winrt.cc:1075 Getting Default Adapter failed.
@CGalactica perhaps you should add a delay before calling the start() function at the beginning of the script. (line 62) I suspect your browser takes a little to long to load thus not finding all the buttons.
If the script can't find your login inputs, just right click on the input field -> inspect element -> right click on the outlined element -> copy full X Path and paste it where the inputs are (line 66 for username and 68 for pass)
Thanks I'll try that. Also, apologies for the belated reply.
Describe the bug Error is thrown after running the .py file. Browser spawns but unable to locate the fields, likely because IG has made updates since the last commit.
To Reproduce Steps to reproduce the behavior:
Expected behavior Spawn new browser window, go to Instagram website and login as user with provided hard-coded credentials.
Desktop (please complete the following information):
**Chrome Driver
Additional context