Open rgov opened 4 years ago
Apparently yes: https://stackoverflow.com/questions/38732822/compile-chromedriver-on-arm
I was able to just use apt install chromium-driver
and then presumably the resulting tool is already in $PATH
so it's not necessary to do anything else.
Interesting. Does this fail at any stage using chromedriver-binary
as it is in the repo now?
Specifically, does importation append the wrong binary to the front of $PATH
?
Well if you install chromedriver-binary
it will give you a chromedriver
that cannot be executed so as soon as the code calls this tool, it will fail.
Right, totally get that, but does the code in this repo work as-is, assuming you've installed chromium-driver
via apt?
Or does the importation of chromedriver-binary
alter PATH
such that it tries to use the x86 binary and fails?
Ah, right. chromedriver-binary
prefixes PATH
so it would seem that the kernel will attempt to launch the x86 binary before the installed package.
I haven't tried yet because this doesn't support logging into Amazon, it expects Chrome is already logged in, so I wasn't able to use it in the headless manner I expected.
Yeah, I thought that might be the case. A conditional import based on platform.machine()
may be a viable option, though that doesn't help with the headless bit.
I had thought about automating the login process - sending values to elements is easy enough, but things get complicated when you've either enabled, or Amazon forces OTP.
Can I just copy cookies from a logged in browser on another machine?
I can confirm that the chromedriver.exe placed in the folder with the script is getting executed before chromedriver-binary. So it should be easy to override it with whatever other driver one may want.
@rgov I looked into that initially, but there are various hoops one has to jump through to programmatically access profile protected storage (cookes, localStorage, etc.).
On OSX anyway, it requires access to the Chrome Safe Storage
keychain item.
You may be able to do this manually, however, or by running a Selenium instance on the authenticated machine, using your authenticated chrome profile (via the user-data-dir
argument to ChromeOptions
), then using something like utils.store_session_data
from this repo.
The
chromedriver-binary
package only includes an x86_64 binary, so this can't be run on a Raspberry Pi or other ARM system.Is there an alternative?