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',