Open jvftw opened 1 year ago
same issue!!
Same issue as well
Its like instapy needs upgrade regarding browser.py as well. Here I have fixed the issue as following:
# firefox_profile.update_preferences()
firefox_options.profile = firefox_profile
# prefer user path before downloaded one
driver_path = geckodriver_path or get_geckodriver()
ser = FirefoxService(executable_path=driver_path, log_path=geckodriver_log) # we can use webdriver manager as well
browser = webdriver.Firefox(
# firefox_profile=firefox_profile, # delete this line of code.
service=ser,
options=firefox_options,
)
still not working. leads to NameError: name 'FirefoxService' is not defined this time.
still not working. leads to NameError: name 'FirefoxService' is not defined this time.
Mine worked using this: firefox_options.profile = firefox_profile
geckodriver_log = "{}geckodriver.log".format(logfolder)
# prefer user path before downloaded one
driver_path = geckodriver_path or get_geckodriver()
firefox_options.executable_path=driver_path
firefox_options.log_path=geckodriver_log
browser = webdriver.Firefox(
options=firefox_options,
)
I'm stuck on this same issue too.
Basically from selenium4 firefox_profile
has been deprecated.
So you have 2 ways to fix this:
pip uninstall selenium
pip install selenium==3.141.0
In browser.py
from selenium.webdriver.firefox.service import Service
# Code from imports to line 122
firefox_options.profile = firefox_profile
service = Service(executable_path=driver_path)
browser = webdriver.Firefox(
service=service,
options=firefox_options,
)
InstaPy Version: 0.6.16 .. .. .. .. .. .. .. .. ._. Workspace in use: "C:/Users/USER/InstaPy" Traceback (most recent call last): File "c:\Users\USER\Desktop\Stuff\instapy\quickstart.py", line 25, in
session = InstaPy(username=insta_username,
File "C:\Users\USER\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\instapy\instapy.py", line 330, in init
self.browser, err_msg = set_selenium_local_session(
File "C:\Users\USER\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\instapy\browser.py", line 123, in set_selenium_local_session
browser = webdriver.Firefox(
TypeError: WebDriver.init() got an unexpected keyword argument 'firefox_profile'