nmiodice / id4-reservation-tracker Goto Github PK
View Code? Open in Web Editor NEWA command line tool to check the status of a VW ID4 Reservation
A command line tool to check the status of a VW ID4 Reservation
Hi, thanks for writing this! Having an issue where it seems to be choking right after it gets the username:
$ ./reservation-check.sh
STEP 1/15: FROM python:3.8
STEP 2/15: RUN python3 -m pip install --upgrade pip setuptools wheel
--> Using cache e24752083c6d52117f2501f02b3dabdecf5c348ebc2232e307f11931ee0415f9
--> e24752083c6
STEP 3/15: RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
--> Using cache 7c98b99ab8ca2351c7fff271bc6681fac166a4c2455c41854a6683b4ff688f59
--> 7c98b99ab8c
STEP 4/15: RUN sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
--> Using cache d6de362b38ae7b7a7747780705739c9b8c96ca5732d7629336431dac9a0d14f7
--> d6de362b38a
STEP 5/15: RUN apt-get -y update
--> Using cache 777cdbb966f8bf311e6b0315706a7d6de28da36d705b4ee5de2a92de5167c149
--> 777cdbb966f
STEP 6/15: RUN apt-get install -y google-chrome-stable
--> Using cache 968be711dbfb548daf59eb32e4e20aa98eb96e38fb4d5bf0d7020b4e4c7b19e3
--> 968be711dbf
STEP 7/15: RUN apt-get install -yqq unzip
--> Using cache c715a6e42f9f65124dbe673e06a7212fcef1e9ec2115251ae65ac96d5c21d67c
--> c715a6e42f9
STEP 8/15: RUN wget -O /tmp/chromedriver.zip http://chromedriver.storage.googleapis.com/`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`/chromedriver_linux64.zip
--> Using cache 6a1815f88f274b1551120336f6eb6f721a06ebc7e476d51248f6fe12b0e8b1f8
--> 6a1815f88f2
STEP 9/15: RUN unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/
--> Using cache b196a017e4c2ab5526d6a7ee4eb5fe4ef7e84cb3202c28f73bada600b3146b0a
--> b196a017e4c
STEP 10/15: WORKDIR /src
--> Using cache 0a3e62d3846320835776330422a44d3a0686290229426aa2ab5547bd61a29f8e
--> 0a3e62d3846
STEP 11/15: COPY requirements.txt .
--> Using cache 5b3ed83ad33f80d76ce4d83faafab770ec9a2cfd7c8b6ed9065acbaf63f80be8
--> 5b3ed83ad33
STEP 12/15: RUN python3 -m pip install -r requirements.txt
--> Using cache 78fb858d6a77929a8d4ad267762f553a7780c4539db5a5152139aed38b61249c
--> 78fb858d6a7
STEP 13/15: COPY *.py ./
--> Using cache eff15db79fd6950d5f34749c5733602c0f6be165d0ba8996b1f6842be6782202
--> eff15db79fd
STEP 14/15: ENV PYTHONWARNINGS="ignore:Unverified HTTPS request"
--> Using cache 88fafec359072fb8d5e57f019b744ad9281435da3c4f48899e79522cf502483b
--> 88fafec3590
STEP 15/15: ENTRYPOINT ["python3"]
--> Using cache bad33183a2cd0942a191418e6ecf88a3668f380ad225a5ab73d8fd037b79b898
COMMIT vw-reservation:latest
--> bad33183a2c
Successfully tagged localhost/vw-reservation:latest
bad33183a2cd0942a191418e6ecf88a3668f380ad225a5ab73d8fd037b79b898
CONFIG: Using page load timeout of 120
Loading VW reservation page...
Entering username...
<html><head></head><body></body></html>
Traceback (most recent call last):
File "reservation-check.py", line 71, in main
usernameInput = WebDriverWait(driver, pageLoadTimeout).until(
File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/support/wait.py", line 89, in until
raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message:
Stacktrace:
#0 0x55ed70e12f33 <unknown>
#1 0x55ed70b5d118 <unknown>
#2 0x55ed70b933f7 <unknown>
#3 0x55ed70b935c1 <unknown>
#4 0x55ed70bc65c4 <unknown>
#5 0x55ed70bb0f9d <unknown>
#6 0x55ed70bc42e4 <unknown>
#7 0x55ed70bb0e63 <unknown>
#8 0x55ed70b8682a <unknown>
#9 0x55ed70b87985 <unknown>
#10 0x55ed70e574cd <unknown>
#11 0x55ed70e5b5ec <unknown>
#12 0x55ed70e4171e <unknown>
#13 0x55ed70e5c238 <unknown>
#14 0x55ed70e36870 <unknown>
#15 0x55ed70e78608 <unknown>
#16 0x55ed70e78788 <unknown>
#17 0x55ed70e92f1d <unknown>
#18 0x7f5c3ff03ea7 <unknown>
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "reservation-check.py", line 177, in <module>
main()
File "reservation-check.py", line 127, in main
raise Exception(error) from e
Exception: ERROR: Please creat a GitHub Issue with the full error output
ERROR: Note: Your username and password may show up in the output. There was an attempt to redact them
ERROR: Please confirm that your username and password do not show up in the output above!
$ echo $USERNAME
e*******.********@gmail.com
Edited for privacy, obvs, but the echo shows my username variable is correct.
[ 6/13] RUN apt-get install -y google-chrome-stable:
#10 0.162 Reading package lists...
#10 0.428 Building dependency tree...
#10 0.491 Reading state information...
#10 0.541 E: Unable to locate package google-chrome-stable
executor failed running [/bin/sh -c apt-get install -y google-chrome-stable]: exit code: 100
I am using docker desktop, I'm trying to run this on mac, but since you're using docker, it should work?
Could you give me a pointer as to what needs to change in reservation.py around makeGraphQLAPICall (I assume) to extract information on multiple reservations. From the Dev tools, I see the data shows up as an array. I can't seem to nail down the format to extract this array and then display the 2 reservations' info separately. Right now, this script just picks the reservation at the top.
For example, the data looks like (with some obfuscation):
{"data":{"authenticatedGetReservations":{"content":[{"deliveryDealerCode":"423320","orderStatusCode":"01","publicReservationId":"blahblahbl","reservationStatus":"ACTIVE","configurationId":null,"vwModelCodeKey":"E813SN$MAAUE0A$MRELV0A$GW02W02","marketingCode":"VKY3NI33","configurationRoute":"/en/builder.html/__app/id-4/id-4-awd-pro-s.app?category-app=private&carlineId-app=30291&exteriorId-app=F14+6L6L&interiorId-app=F56+++++ZY&modelId-app=E813SN%24MAAUE0A%24MRELV0A%24GW02W02&modelVersion-app=5&modelYear-app=2023&salesGroupId-app=31815&trimName-app=ID.4+AWD+Pro+S&buildabilityStatus-app=buildable","creationDateTime":"1668118427000","fromEstmtdDlvryDate":null,"toEstmtdDlvryDate":null,"reservationAdminStatus":"ACTIVE_NOT_ORDERED_AUTHENTICATED","fspayAccNo":"10001403498408000","orderRequestedDate":null,"expirationDate":null,"commissionNumber":null,"__typename":"Reservation"},{"deliveryDealerCode":"423321","orderStatusCode":"05","publicReservationId":"blahblahbl","reservationStatus":"ACTIVE","configurationId":null,"vwModelCodeKey":"E813SN$MAAUE0A$MRELV0A$GW02W02","marketingCode":"VVGC73D4","configurationRoute":"/en/builder.html/__app/id-4/id-4-awd-pro-s.app?buildabilityStatus-app=buildable&category-app=private&carlineId-app=30291&salesGroupId-app=31815&trimName-app=ID.4+AWD+Pro+S&modelId-app=E813SN%24MAAUE0A%24MRELV0A%24GW02W02&modelVersion-app=5&modelYear-app=2023&exteriorId-app=F14+P2P2&interiorId-app=F56+++++ZZ&options-app=MZABQW6","creationDateTime":"1659233698000","fromEstmtdDlvryDate":"2023-01-01","toEstmtdDlvryDate":"2023-06-01","reservationAdminStatus":"ACTIVE_ORDER_CONFIRMED","fspayAccNo":"10001403498408000","orderRequestedDate":"2022-09-20","expirationDate":null,"commissionNumber":"5N4968","__typename":"Reservation"}],"__typename":"ReservationsPage"}}}
Thanks for sharing this! I get the following error:
Loading VW reservation page...
Entering username...
Submitting username...
Entering password...
Traceback (most recent call last):
File "main.py", line 132, in <module>
main()
File "main.py", line 63, in main
passwordInput = WebDriverWait(driver, 10).until(
File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/support/wait.py", line 89, in until
raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message:
Stacktrace:
#0 0x55ff98888a23 <unknown>
#1 0x55ff98353e18 <unknown>
#2 0x55ff9838a151 <unknown>
#3 0x55ff9838a311 <unknown>
#4 0x55ff983bcec4 <unknown>
#5 0x55ff983a79bd <unknown>
#6 0x55ff983bac5b <unknown>
#7 0x55ff983a7883 <unknown>
#8 0x55ff9837d3fa <unknown>
#9 0x55ff9837e4c5 <unknown>
#10 0x55ff988b816d <unknown>
#11 0x55ff988ce5bb <unknown>
#12 0x55ff988b9e75 <unknown>
#13 0x55ff988cee85 <unknown>
#14 0x55ff988ad86f <unknown>
#15 0x55ff988e9ae8 <unknown>
#16 0x55ff988e9c68 <unknown>
#17 0x55ff98904aad <unknown>
#18 0x7f018293eea7 <unknown>
I tried exporting the username and password with and without quotes and get the same error. What am I getting wrong?
Thanks for throwing this together! I'm running the search now and it seems to only be spitting out model year 2021 and 2022 vehicles (I added a CSV column for year
). Is there anything you're aware of that might be preventing 2023 vehicles from showing up?
I know you got your vehicle a while ago so don't have much motivation to dig around too much, so any pointers you might have for getting them to show up would be appreciated. Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.