~josealberto4444/apodnasabot

9e50c81d987023a69b83a9b3def2d5a5b9e3a54a — José Alberto Orejuela García 2 years ago 8295bf5 0.1.2
Don't use hdurl for sending images

Sometimes the image is too big and the bot library fails due to that.
1 files changed, 2 insertions(+), 3 deletions(-)

M api.py
M api.py => api.py +2 -3
@@ 50,9 50,8 @@ class Apod:
            self.title = self.api_response['title']
            self.media_type = self.api_response['media_type']
            if self.media_type == 'image':
                self.link = self.api_response['hdurl']
            elif self.media_type == 'video':
                self.link = self.api_response['url']
                self.hdlink = self.api_response['hdurl']
            self.link = self.api_response['url']
            self.explanation()

    def ask_api(self):