ChuckMac / ADRFinder

Self-Hosted, Open Source, Advanced Dining Reservation Notifications for Disney World
Apache License 2.0
41 stars 11 forks source link

KeyError: diningFormFilter #26

Open CoocooFroggy opened 9 months ago

CoocooFroggy commented 9 months ago

Describe the bug A clear and concise description of what the bug is.

Version 0.2.9.1

To Reproduce Steps to reproduce the behavior:

  1. Deploy app
  2. Try to load website — receive 500 internal server error
ERROR:adrfinder:Exception on / [GET]
Traceback (most recent call last):
  File "/usr/local/flask/app.py", line 2190, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/flask/app.py", line 1486, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/flask/app.py", line 1484, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/flask/app.py", line 1469, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/flask_login/utils.py", line 290, in decorated_view
    return current_app.ensure_sync(func)(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/adrfinder/__init__.py", line 350, in index
    rest_and_times = get_restaurants_and_times()
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/adrfinder/__init__.py", line 1021, in get_restaurants_and_times
    search_times = rest.get_search_times()
                   ^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/adrfinder/restaurants.py", line 144, in get_search_times
    for mealPeriods in dining_data['filters']['diningFormFilter']['mealPeriods']:
                       ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
KeyError: 'diningFormFilter'
ChuckMac commented 9 months ago

Disney has changed the format of their dining json which is causing this issue.

Even moving past this, they have changed so now authentication is required to see reservation availabilty. Kind of debating how much sense it makes to still move forward with this given this would now require users to enter their Disney credentials for it to work.

CoocooFroggy commented 9 months ago

I see—would any dummy account work, if users don't want to store their actual credentials to run the program? Although I understand if there's a lot of work involved in implementing authentication

ChuckMac commented 9 months ago

I'm fairly sure a dummy account would suffice

corbantek commented 7 months ago

Anyone planning this work for the future? I may try to take this up later this Spring but wanted to know if this project was dead or not...

amorabito commented 7 months ago

I was trying to figure out the authentication for new API from the network tab/postman proxy but could not figure out how to use the google captcha stuff...

CoocooFroggy commented 7 months ago

If dining reservations are protected by reCAPTCHA, we're probably out of luck (unless we can find a workaround endpoint).

There are captcha solving services which cost money; but if every availability refresh costs a token, it's going to get very expensive very quickly.

Although this might not be what you're implying? As I feel it would be a hassle for mobile devices to make dining reservations if every request is reCAPTCHA checked.