~josealberto4444/apodnasabot

ref: 822a07d720a1126f8fd29b4d8bc74542a6fc533f apodnasabot/api.py -rw-r--r-- 5.3 KiB
Don't use hdurl for sending images

Sometimes the image is too big and the bot library fails due to that.
Make scrapping more robust
Refactor code

It creates the Apod class called from every bot and also useful functions. It
seems to be a (bit) decent library.
Make the first version of the Telegram bot
Scrap description with links from web page

The API does not give the description with the links, so I had to write a
scrapping tool to get it from the main page.
Deal with invalid dates correctly
Ask API only if not downloaded
Download and save video

It checks the media type and download accordingly.
Get the response as JSON object
Read API key from config file