From 4450fbe6938e4d5ad6da603ae388238b7977c70c Mon Sep 17 00:00:00 2001 From: harrypython Date: Sat, 30 May 2020 05:57:39 -0700 Subject: [PATCH] New version 1.3.4 Resolves #12 - Infinity Checkpoint, Resolves #14 - Crashing if you run comments, --- ItsAGramLive/ItsAGramLive.py | 7 +++++-- setup.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ItsAGramLive/ItsAGramLive.py b/ItsAGramLive/ItsAGramLive.py index 45f6ee3..d1f0b4c 100644 --- a/ItsAGramLive/ItsAGramLive.py +++ b/ItsAGramLive/ItsAGramLive.py @@ -426,5 +426,8 @@ def stop(self): def get_comments(self): if self.send_request("live/{}/get_comment/".format(self.broadcast_id)): - for comment in self.LastJson['comments']: - print(f"{comment['user']['username']} has posted a new comment: {comment['text']}") + if 'comments' in self.LastJson: + for comment in self.LastJson['comments']: + print(f"{comment['user']['username']} has posted a new comment: {comment['text']}") + else: + print("There is no comments.") diff --git a/setup.py b/setup.py index 49fa24e..9a0fa9c 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ setuptools.setup( name='ItsAGramLive', - version='1.2.3', + version='1.3.4', packages=setuptools.find_packages(), url='https://github.com/harrypython/itsagramlive', license='GPL-3.0',