The follow user's followers is working as it should, but it's not creating the files on Visual Studio.
When I hover over the self.CreateFiles() it shows "(method) CreateFiles: () -> None".
When I tested the Unfollow Users function. it gave me those errors:
Choice: 2
How many to unfollow? (followed 10) 3
Traceback (most recent call last):
File "c:\Users\Vitor Santos\Documents\Instagram\insta-bot-tutorial-main\insta-bot-tutorial-main\InstagramBot [Episode 2].py",
line 247, in
TestRuns = InstagramBot("nintenshirts", "123789456s3")
File "c:\Users\Vitor Santos\Documents\Instagram\insta-bot-tutorial-main\insta-bot-tutorial-main\InstagramBot [Episode 2].py",
line 21, in init
self.Choose()
File "c:\Users\Vitor Santos\Documents\Instagram\insta-bot-tutorial-main\insta-bot-tutorial-main\InstagramBot [Episode 2].py",
line 36, in Choose
self.UnfollowFollowed()
File "c:\Users\Vitor Santos\Documents\Instagram\insta-bot-tutorial-main\insta-bot-tutorial-main\InstagramBot [Episode 2].py",
line 206, in UnfollowFollowed
self.UnfollowUser(user)
File "c:\Users\Vitor Santos\Documents\Instagram\insta-bot-tutorial-main\insta-bot-tutorial-main\InstagramBot [Episode 2].py",
line 75, in UnfollowUser
self.driver.find_element_by_xpath("/html/body/div[5]/div/div/div/div[3]/button[1]").click()
File "C:\Users\Vitor Santos\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py",
line 394, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "C:\Users\Vitor Santos\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py",
line 976, in find_element
return self.execute(Command.FIND_ELEMENT, {
File "C:\Users\Vitor Santos\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py",
line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\Vitor Santos\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/div[5]/div/div/div/div[3]/button[1]"}
(Session info: chrome=92.0.4515.131)
I'm a complete beginner on codding and VS, I would appreciate a lot if you could help me. Thank you!