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):