Git Product home page Git Product logo

everettsouthwick / trusted-traveler-scheduler Goto Github PK

View Code? Open in Web Editor NEW
38.0 38.0 10.0 191 KB

Python script for periodically fetching appointment dates from the Trusted Traveler Program API for Global Entry, Nexus, SENTRI, and FAST, with notifications to the user when new appointments are discovered.

License: GNU General Public License v3.0

Python 99.33% Dockerfile 0.67%
cbp docker entry fast global global-entry globalentry nexus program python sentri traveler trusted trusted-traveler trusted-traveler-program ttp

trusted-traveler-scheduler's Introduction

Hello, I'm Everett ๐Ÿ‘‹

Skills

GitHub Stats

Top Languages

trusted-traveler-scheduler's People

Contributors

daytonajrw avatar dependabot[bot] avatar dxnter avatar everettsouthwick avatar renovate[bot] avatar shuffle2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

trusted-traveler-scheduler's Issues

Strange JSONDecodeError

Describe the bug
Trying to run after setting up the config.json and installing all of the packages called out in the requirements.txt
Experienced the following traceback in the screenshot below

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10 22H2
  • Python v3.10.11

Appointments Reported by Script Don't Exist in Scheduler UI

I'm getting Notified of appointments by the script. When I login to book them, they don't exist, and the script continues to report their existence.

To Reproduce
Steps to reproduce the behavior:
1: Add a config for location 13321 and date 7th June 2023 (for example)
2: You will receive notification of available appointments from the script
3: Login to https://ttp.cbp.dhs.gov/ and go to reschedule interview
4: for the location configured, note that no appointments are available

Expected behavior
Appointments reported by script should exist in scheduler UI

Screenshots
If applicable, add screenshots to help explain your problem.
image
image

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser Tested with Edge, Firefox, Chrome
  • Version Latest versions

Smartphone (please complete the following information):

  • Device: iPhone 13 Pro
  • OS: iOS 16.5
  • Browser Safari, Firefox, Edge
  • Version Latest versions

Additional context
Could be location specific - I tested this with another location and the reported appointment did exist in the UI.

My config looks like this:

{
  "current_appointment_date": "June 7, 2023",
  "location_ids": [ 13321 ],
  "notification_level": 1,
  "notification_urls": [ "discord://webhookurl" ],
  "retrieval_interval": "5m",
  "start_appointment_time": "00:00",
  "end_appointment_time": "23:59"
}

I am running the script via Docker. Container image ecsouthwick/trusted-traveler-scheduler:latest retrieved 2023-05-24. I have also run the script locally cloned from this repo with the same results.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

dockerfile
Dockerfile
github-actions
.github/workflows/docker-develop-publish.yml
  • actions/checkout v4
  • docker/login-action v3
  • docker/metadata-action v5
  • docker/build-push-action v5
.github/workflows/docker-image.yml
  • actions/checkout v4
.github/workflows/docker-latest-publish.yml
  • actions/checkout v4
  • docker/login-action v3
  • docker/metadata-action v5
  • docker/build-push-action v5
pip_requirements
requirements.txt
  • apprise ==1.7.2
  • requests ==2.31.0

  • Check this box to trigger a request for Renovate to run again on this repository

sql database does not track removed availability

Currently the code only ever adds (location_id, start_time) pairs to the sql database, and uses this to determine if an available appointment is newly-seen or not. This results in missing the time slot if the appointment goes through a process like:

  1. appointment is newly seen and reported
  2. user is beaten to the appointment by someone else / appointment is unavailable for some reason
  3. appointment slot becomes available again
    At 3) above, the appointment, which should be treated as new availability, is not reported to user again.

It's probably impossible to foolproof this (unless the dhs.gov API exposes some more functionality), but it would at least be nice to clear out db entries if they are missing from a newly returned API request in _get_schedule.

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.