I bought a raspberry specifically for instapy, I installed it earlier this year and it worked great.
I had to reset my raspberry and consequently reinstall everything.
I realized that now it no longer uses chrome and I can't find a way to make it work.
how do I install a previous version to make it work on raspberry pi3
OS error 8 - no way to to make it work with gecko
install a previous version
same for all Instapy users on Raspberry, nobody could manage to make it works.. so sad
Digging inside this section you will find that lot of people are reporting problems with instapy on RapsB on the last months.
We are still waiting for a solution.
Digging inside this section you will find that lot of people are reporting problems with instapy on RapsB on the last months.
We are still waiting for a solution.
true!
On discord, it is said that when reversing to geckodriver 0.23.0 it should works..but I tried and it didn't on my side..
and @timgrossmann annonced on discord that he will no longer develop Instapy :(
In other words, farewell instapy
Just a heads-up for those interested: there is a way to fix it since there's a version of chromedriver that works on RP3 (including in headless mode).
set_selenium_local_session() in browser.py (I think, quoting from memory) was written in a way that favours Firefox and Selenium's Chrome options work in a fundamentally different way - essentially, chromedriver is not supported in 0.6.4 of InstaPy.
If I get some time I'll write a fix and submit a PR in the next week or so, unless someone else wants to work on it (@ me so we're not duplicating effort).
@analyticsdept do it please! Thank you!!
Just a heads-up for those interested: there is a way to fix it since there's a version of chromedriver that works on RP3 (including in headless mode).
set_selenium_local_session() in browser.py (I think, quoting from memory) was written in a way that favours Firefox and Selenium's Chrome options work in a fundamentally different way - essentially, chromedriver is not supported in 0.6.4 of InstaPy.
If I get some time I'll write a fix and submit a PR in the next week or so, unless someone else wants to work on it (@ me so we're not duplicating effort).
That would be awesome. :)
It is possible to use InstaPy on rpi with firefox and geckodriver. You just need to download the last rpi compatible geckodriver(v0.23.0-arm7hf) and rename it so that it is in the place of v0.25.0-linux32.
It is possible to use InstaPy on rpi with firefox and geckodriver. You just need to download the last rpi compatible geckodriver(v0.23.0-arm7hf) and rename it so that it is in the place of v0.25.0-linux32.
Good to know, thanks! I'm going to revive that old thread about InstaPy 5.0 - I'm wondering if it's a better approach to double down on a particular browser so it's easier to support.
On my progress for now though, I've implemented chromedriver and it's working mostly fine - I've discovered that some parts of the Firefox browser extension need to be rewritten to work in Chrome so there's still some work to be done; running hangs in places that rely on that.
Once that's finished there's some logic missing to determine which browser should be used or downloaded if missing, so I have some more refactoring to do :P
It is possible to use InstaPy on rpi with firefox and geckodriver. You just need to download the last rpi compatible geckodriver(v0.23.0-arm7hf) and rename it so that it is in the place of v0.25.0-linux32.
ok unfortunately this still doesn't work for me... what am I doing wrong?
I always get the error message: Unable to login to Instagram!
So trying to get chromedriver up and running on RP is a bit more challenging than I thought it would be. I wanted to take a break from running face-first into a brick wall for a minute and managed to get it working with Firefox. For anyone struggling, give this a shot.
--- First step is to uninstall any existing versions of InstaPy, so in terminal run this
sudo pip3 uninstall instapy
-- Then run the following
sudo pip3 install instapy
sudo apt-get install xvfb
sudo apt-get install firefox-esr
-- Download and unpack https://npm.taobao.org/mirrors/geckodriver/v0.23.0/geckodriver-v0.23.0-arm7hf.tar.gz
-- Copy to a fresh directory where you're going to keep your new workspace and scripts for each account
-- Add set_workspace(path="/home/your_new_workspace/") below the import lines in your scripts
-- Add geckodriver_path as an argument to the InstaPy object
session = InstaPy(username=, password=, headless_browser=true, geckodriver_path="/home/your_new_workspace/geckodriver")
-- Now you're going to need to open terminal again and cd to the instapy installation directory - mine is below to give you some guidance
cd /usr/local/lib/python3.7/dist-packages/instapy
-- Open up browser.py
sudo nano browser.py
-- Add this line to the top of the script where the imports are
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
-- Find this line:
firefox_options = Firefox_Options()
-- Below it, add this:
capabilities = DesiredCapabilities.FIREFOX
capabilities['marionette'] = True
-- Then add capabilities as an argument to the WebDriver object
browser = webdriver.Firefox(
firefox_profile=firefox_profile,
executable_path=driver_path,
options=firefox_options,
capabilities=capabilities,
)
-- Save the file and exit
-- That's it! Now cd to your workspace folder and run your script with the following
sudo xvfb-run python3 my_insta_script.py
Hopefully that works for you. For some reason, at the end of sessions it's not quitting gracefully and returns an error about stale elements, but that's just because the session has already ended.
Let me know how it goes! :)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this problem still occurs, please open a new issue
Most helpful comment
Just a heads-up for those interested: there is a way to fix it since there's a version of chromedriver that works on RP3 (including in headless mode).
set_selenium_local_session() in browser.py (I think, quoting from memory) was written in a way that favours Firefox and Selenium's Chrome options work in a fundamentally different way - essentially, chromedriver is not supported in 0.6.4 of InstaPy.
If I get some time I'll write a fix and submit a PR in the next week or so, unless someone else wants to work on it (@ me so we're not duplicating effort).