Closed darryllee closed 1 year ago
Thanks for the detailed write-up. I’ll try later today with the same undetected chromedriver and Chrome v104 today to see if that’s the issue.
How did you get the image to build for ARMv7? I tried on my machine and it took about 20 minutes to build (because it was building a lot of libraries from scratch) and then failed.
Edit: Never mind, it doesn't appear you are using Docker.
I'm not able to get Chromium v104, but I tried with Undetected Chromedriver 3.1.0 and did not run into any issues. Did you specify the Chrome version as 104 in your config.json? The logs don't seem to indicate that a specific version was set.
So I was on a Raspberry Pi 4 and just ran:
pip install -U git:https...pathtothearmport
I had previously installed this so maybe that's why it didn't need to rebuild all the libraries, etc.
[For context: After mistakenly upgrading to a newer incompatible version of Chromium a while back, I tried all kinds of hackery like trying to download and extract chromedriver for ARMv7 from Electron and then hardcode a path to it into your code but in the end I found a Pi-Apps script that let me downgrade to a compatible version of Chromium (104)]
Thanks for your great work!! --
--Darryl Lee @.***>
My guess is that the undetected chromedriver port you are using is the reason you are being detected by Southwest or . The regular library should work with ARMv7 except for the downloading of the chromedriver. In this case you can download your own (which it appears you already did) and add full path to it in the config.json under chromedriver_path
.
Ooof, sorry I'm being dense. So I have upgraded my Chromium to 109, as I see there is already a "matching" chromedriver. Is this supposed to work with undetected_chromedriver? I do not know.
hi chromium-browser 109.0.5414.112-rpt2 arm64 Chromium web browser, open-source version of Chrome ii chromium-chromedriver 109.0.5414.112-rpt2 arm64 WebDriver driver for the Chromium Browser
I grab the latest undetected_chromedriver by running:
pip install git+https://www.github.com/ultrafunkamsterdam/undetected-chromedriver@master # replace @master with @branchname for other branches
I make a copy of /usr/bin/chromedriver -> /home/pi/chromedriver_copy and specify it in config.json:
"chromedriver_path": "/home/pi/chromedriver_copy"
And now... I don't know what's wrong. :-{
$ python southwest.py -v 2023-08-01 21:23:53 DEBUG MainProcess[log:23]: Initialized the application 2023-08-01 21:23:53 DEBUG MainProcess[main:87]: Called with 0 arguments 2023-08-01 21:23:55 DEBUG MainProcess[config:44]: Reading the configuration file 2023-08-01 21:23:55 DEBUG MainProcess[config:137]: Adding 1 accounts from the configuration file 2023-08-01 21:23:55 DEBUG MainProcess[config:66]: Setting check fares to True 2023-08-01 21:23:55 DEBUG MainProcess[config:80]: Setting custom Chromedriver path 2023-08-01 21:23:55 DEBUG MainProcess[config:95]: Setting notification level to 1 2023-08-01 21:23:55 DEBUG MainProcess[config:109]: Using 1 notification services 2023-08-01 21:23:55 DEBUG MainProcess[config:121]: Setting retrieval interval to 24 hours 2023-08-01 21:23:55 DEBUG MainProcess[main:113]: Monitoring 1 accounts and 0 reservations 2023-08-01 21:23:55 DEBUG Process-1[reservation_monitor:133]: Retrieving reservations for account 2023-08-01 21:23:55 DEBUG Process-1[webdriver:138]: Starting webdriver for current session could not detect version_main.therefore, we are assuming it is chrome 108 or higher 2023-08-01 21:23:57 DEBUG Process-1[webdriver:147]: Loading Southwest Check-In page 2023-08-01 21:23:58 DEBUG Process-1[webdriver:90]: Logging into account to get a list of reservations and valid headers Process Process-1: Traceback (most recent call last): File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap self.run() File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "/home/pi/workplace/auto-southwest-check-in/lib/reservation_monitor.py", line 113, in monitor reservations, skip_scheduling = self._get_reservations() File "/home/pi/workplace/auto-southwest-check-in/lib/reservation_monitor.py", line 137, in _get_reservations reservations = webdriver.get_reservations(self) File "/home/pi/workplace/auto-southwest-check-in/lib/webdriver.py", line 94, in get_reservations WebDriverWait(driver, 30).until( File "/home/pi/.local/lib/python3.9/site-packages/selenium/webdriver/support/wait.py", line 95, in until raise TimeoutException(message, screen, stacktrace) selenium.common.exceptions.TimeoutException: Message: Stacktrace:
0 0x00558907ff44
1 0x005588e6b4cc
2 0x005588ea0cd0
3 0x005588ed4c0c
4 0x005588e95bfc
5 0x005588e96c08
6 0x0055890cb27c
7 0x0055890cd93c
8 0x0055890cdf8c
9 0x0055890b63e4
10 0x0055890ce6a8
11 0x0055890a8b6c
12 0x0055890ec288
13 0x0055890ec408
14 0x005589106110
15 0x007f95143648 start_thread
16 0x007f94c6ec1c
For good measure I upgraded to Chromium 113 and had the same problems with a slightly different stacktrace:
hi chromium-browser 113.0.5672.95-rpt1 arm64 Chromium web browser, open-source version of Chrome ii chromium-chromedriver 113.0.5672.95-rpt1 arm64 WebDriver driver for the Chromium Browser
Errors - hum. Maybe I need to maybe clean install selenium, et al.
selenium.common.exceptions.TimeoutException: Message: Stacktrace:
0 0x00557635a088
1 0x0055760c9808
2 0x0055760fee70
3 0x0055761321c4
4 0x0055760f4aa8
5 0x0055760f5a04
6 0x005576320aec
7 0x0055763236b0
8 0x005576323c88
9 0x00557632b6e4
10 0x0055763242dc
11 0x0055762feda0
12 0x005576342e98
13 0x005576343028
14 0x0055763526c4
15 0x007f95cf7648 start_thread
16 0x007f95822c1c
GAH. OK! Ran pip install -r requirements.txt and it downgraded from undetected-chromedriver-3.5.0 to 3.1.7
And it ran without errors!
So for anyone else, THIS WORKED on Debian GNU/Linux 11 (bullseye) on a Raspberry Pi 4:
With these packages installed:
Copy the chromedriver binary so it can be patched by undetected_chromedriver:
cp /usr/bin/chromedriver /home/pi/chromedriver_copy
Specify the location of the chromedriver in json.config:
"chromedriver_path": "/home/pi/chromedriver_copy"
WOOT! (Well, we'll see if I get checked in on Thursday night. :-)
Good to hear! Currently, this script only works with undetected chromedriver up to 3.4.7. It doesn’t work with version 3.5.0 due to Selenium Wire, but I made a pull request to fix it. That might take a while to be merged, however, because that project is not currently active.
Hey @darryllee, was the check in successful on your Raspberry Pi?
Yes! Got the notification and everything!!
On Fri, Aug 4, 2023 at 8:16 PM Joey Holtzman @.***> wrote:
Hey @darryllee https://github.com/darryllee, was the check in successful on your Raspberry Pi?
— Reply to this email directly, view it on GitHub https://github.com/jdholtz/auto-southwest-check-in/issues/129#issuecomment-1666369212, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANODJSIZ6TULWIXREZMLPDXTW3HNANCNFSM6AAAAAA27GEJAE . You are receiving this because you were mentioned.Message ID: @.***>
--
--Darryl Lee @.***>
Nice! I’ll point anyone with a similar setup to this issue in the future. Thanks for taking your time to test and outline the process.
Description
I used the olde undetected-chromedriver for ARMv7 (3.1.0) with olde Chromium 104 and console showed error about too many requests, BUT CHECK-IN was successful (I think).
Do you suppose it's because I'm running such an old version of undetected_chromedriver (3.1.0)? I'd love to run a newer version but don't have the expertise to hack the newer undetected_chromedriver to work with ARMv7.
Thanks!
Output:
Log:
And now I'm trying to log into my account for the return flight, and am seeing too many requests on console:
Log:
To Reproduce
Expected Behavior
Should see a successful checkin. Also successful login and retrieval of upcoming reservation.
Version
Auto-Southwest Check-In v4.3
Additional context
No response