Giter Site home page Giter Site logo

gideonshaked / nextinspace Goto Github PK

View Code? Open in Web Editor NEW
119.0 3.0 3.0 281 KB

Never miss a launch. πŸš€

License: GNU General Public License v3.0

Python 100.00%
space space-news nextinspace outer-space space-travel spaceflight spaceflightnews rockets spacex rocketry

nextinspace's People

Contributors

gideonshaked avatar jakkso avatar penguwin 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  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  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  avatar  avatar

nextinspace's Issues

Catch the ratelimit exception

Traceback (most recent call last):
  File "/Users/derkweijers/.pyenv/versions/3.9.0/lib/python3.9/site-packages/nextinspace/api.py", line 230, in get_data
    response.raise_for_status()
  File "/Users/derkweijers/.pyenv/versions/3.9.0/lib/python3.9/site-packages/requests/models.py", line 941, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: https://ll.thespacedevs.com/2.0.0/event/upcoming/?limit=1

I think it would be nicer to catch the ratelimit exception and return a cleaner error :)

Conversion into local time is not done correctly

The time in the output is supposedly local (in my case ET), but is actually the time of the item in UTC.
Example:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚Atlas V 531 | NROL-101                                                                  β”‚
β”‚Space Launch Complex 41, Cape Canaveral, FL, USA                                        β”‚
β”‚                                                                                        β”‚
β”‚    Tue November 03, 2020 10:58 PM EST                                                  β”‚
β”‚    Launch Type: Government/Top Secret                                                  β”‚
β”‚                                                                                        β”‚
β”‚    Classified payload for the U.S. National Reconnaissance Office.                     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

This SHOULD be:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚Atlas V 531 | NROL-101                                                                  β”‚
β”‚Space Launch Complex 41, Cape Canaveral, FL, USA                                        β”‚
β”‚                                                                                        β”‚
β”‚    Tue November 03, 2020 5:58 PM EST                                                   β”‚
β”‚    Launch Type: Government/Top Secret                                                  β”‚
β”‚                                                                                        β”‚
β”‚    Classified payload for the U.S. National Reconnaissance Office.                     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

To confirm see the launch page on the LL2 API.

URL is not correct

nextinspace: 404 Client Error: Not Found for url: https://ll.thespacedevs.com/2.0.1/event/upcoming?limit=1

It looks like we need https://ll.thespacedevs.com/2.1.0/event/upcoming/?limit=1

Dealing with rate limits

I started receiving HTTP 429 errors after just a couple of invocations of the program. Would it be possible to cache the data somewhere for a limited time so it doesn't need to be re-requested when just trying out different combinations of parameters?

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.