duckduckgo / zeroclickinfo-spice

DuckDuckGo Instant Answers based on JavaScript (JSON) APIs
https://duckduckhack.com/
Other
549 stars 942 forks source link

Transit - NJT - 500 Internal Server Error #1431

Closed MrChrisW closed 8 years ago

MrChrisW commented 9 years ago

@mattr555 Looks like dv.njtransit.com may be blocking/limiting requests from your appspot (njt-api.appspot.com) instance. Unfortunately if njtransit.com is rate limiting there's not much we can do :frowning:

Expected: Show results for the query next train from metropark to new york

Actual: No results shown due to API endpoint 500 Internal Server Error. http://njt-api.appspot.com/njt/times/metropark/new-york

HTTPException('Deadline exceeded while waiting for HTTP response from URL: http://dv.njtransit.com/mobile/tid-mobile.aspx?sid=MP',)

This seems to be intermittent, refresh http://njt-api.appspot.com/njt/times/metropark/new-york a few times and it should return the error.

njt

https://duck.co/ia/view/transit_njt

mattr555 commented 9 years ago

@MrChrisW Yeah, I do want to fix this. It currently gets the realtime data by scraping their DepartureVision pages. Their more "developer-friendly" way would be to sign up for their API, but rather than using keys, they decided to have you submit a static IP, which wouldn't really work for appspot :neutral_face:

The appspot logs suggest that this isn't the most widely-used IA, so I suppose this is a tolerated bug for now.

MrChrisW commented 9 years ago

@mattr555 Sure, thanks for the explanation. Maybe one day DDG can host these types of API services :wink:

MrChrisW commented 9 years ago

@mattr555 One more thing, any reason this is also failing? http://njt-api.appspot.com/path/times/jsq/wtc

_Note: Screenshot in IAPages needs fixing https://duck.co/ia/view/transit_path_

mattr555 commented 9 years ago

@MrChrisW I needed to update the gtfs data for PATH. I thought I signed up for emails from them when they update it...

Thanks for being an extra set of eyes on this! :eyes:

MrChrisW commented 9 years ago

@mattr555 No problem! I was actually looking at using your repo :snake: to parse some Australian transport GTFS data, in the process I stumbled upon these things :laughing:

tagawa commented 8 years ago

Seems to work for me, both the IA and the API directly. Also tried refreshing a few times.

mattr555 commented 8 years ago

@tagawa yeah, this is intermittent. With the traffic the IA gets we can probably close this for now and reopen if it gets bad. Thanks for the cleanup!

tagawa commented 8 years ago

Sounds good to me - thanks @mattr555