Giter VIP home page Giter VIP logo

id4-reservation-tracker's People

Contributors

carvellwakeman avatar nmiodice avatar vermagit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

id4-reservation-tracker's Issues

Exception entering username

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.

Unable to locate package google-chrome-stable

% ./reservation-check.sh[+] Building 33.0s (11/18)
=> [internal] load build definition from Dockerfile.reservationcheck 0.0s
=> => transferring dockerfile: 1.05kB 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 128B 0.0s
=> [internal] load metadata for docker.io/library/python:3.8 6.7s
=> [auth] library/python:pull token for registry-1.docker.io 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 12.65kB 0.0s
=> [ 1/13] FROM docker.io/library/python:3.8@sha256:72aae25fa512b2f96ecc8332835d8888d7cf1f446ebc4bfdbb865f7e6ffeb58d 12.9s
=> => resolve docker.io/library/python:3.8@sha256:72aae25fa512b2f96ecc8332835d8888d7cf1f446ebc4bfdbb865f7e6ffeb58d 0.0s
=> => sha256:8dc1d216f5d04a5fd75b2a8cb24af124d3a49c9a2d558ace68fbcf5df60d34fb 8.57kB / 8.57kB 0.0s
=> => sha256:bf62ee63325dbbad699d6845f68c2391db3bf158f60373849c2d1cb6bb479788 4.94MB / 4.94MB 0.4s
=> => sha256:29e37b4c58dd1db7ead6f3c2cdf757f490b4e29c958d2a70559c313e9a03a5ef 10.66MB / 10.66MB 0.8s
=> => sha256:72aae25fa512b2f96ecc8332835d8888d7cf1f446ebc4bfdbb865f7e6ffeb58d 1.86kB / 1.86kB 0.0s
=> => sha256:5bb75d755937ae3bf8d4687b1aa10f716d1393512c9bb52f027abe247be38de8 2.22kB / 2.22kB 0.0s
=> => sha256:d794814721d57f8aaec06ab3652e90212cc3beccf5ff5c87f6ecf8375784bcc8 53.70MB / 53.70MB 2.9s
=> => sha256:9cb366fec153b3461ef6bedb0d03ddfd52da9b314025abfccb50a3e8e8669fdb 54.67MB / 54.67MB 3.3s
=> => sha256:59fa95e4c98bdbabeeea8d446eb3369c6717c3f04eb0a3bee45b2a4e743a1300 189.65MB / 189.65MB 6.0s
=> => sha256:cd9a5a779b84da710e04b3ac413a7e6b4e243a9bc5510aaecc67811cc0deff1c 6.16MB / 6.16MB 3.4s
=> => extracting sha256:d794814721d57f8aaec06ab3652e90212cc3beccf5ff5c87f6ecf8375784bcc8 2.1s
=> => sha256:e1d2f62256b71d0e0612910123768a1753220f450f433a5b7e76408f509c4b17 17.03MB / 17.03MB 4.5s
=> => sha256:10774ba75452b096c9963787fe5f11994b7bf6d7c0a6da25995cbc9fe912cdb7 240B / 240B 3.5s
=> => sha256:25a344846087ebd28f7eaecf7eba6d36310af0032ab8a01cb1fc681b04dec24c 2.87MB / 2.87MB 3.8s
=> => extracting sha256:bf62ee63325dbbad699d6845f68c2391db3bf158f60373849c2d1cb6bb479788 0.2s
=> => extracting sha256:29e37b4c58dd1db7ead6f3c2cdf757f490b4e29c958d2a70559c313e9a03a5ef 0.2s
=> => extracting sha256:9cb366fec153b3461ef6bedb0d03ddfd52da9b314025abfccb50a3e8e8669fdb 1.5s
=> => extracting sha256:59fa95e4c98bdbabeeea8d446eb3369c6717c3f04eb0a3bee45b2a4e743a1300 4.3s
=> => extracting sha256:cd9a5a779b84da710e04b3ac413a7e6b4e243a9bc5510aaecc67811cc0deff1c 0.2s
=> => extracting sha256:e1d2f62256b71d0e0612910123768a1753220f450f433a5b7e76408f509c4b17 0.4s
=> => extracting sha256:10774ba75452b096c9963787fe5f11994b7bf6d7c0a6da25995cbc9fe912cdb7 0.0s
=> => extracting sha256:25a344846087ebd28f7eaecf7eba6d36310af0032ab8a01cb1fc681b04dec24c 0.1s
=> [ 2/13] RUN python3 -m pip install --upgrade pip setuptools wheel 8.2s
=> [ 3/13] RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - 0.8s
=> [ 4/13] RUN sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' 0.2s
=> [ 5/13] RUN apt-get -y update 3.5s
=> ERROR [ 6/13] RUN apt-get install -y google-chrome-stable 0.6s

[ 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?

Display multiple reservations

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"}}}

Error on 'Entering Password...'

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?

Suggestions to search for a model year 2023

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.