From 0e896cbf3491fe5b866c8a9d632a2a9171639a13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Tue, 10 Aug 2021 17:28:45 -0500 Subject: [comments_info]: relax traceback message --- youtube/comments.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'youtube/comments.py') diff --git a/youtube/comments.py b/youtube/comments.py index 54baf61..8eec789 100644 --- a/youtube/comments.py +++ b/youtube/comments.py @@ -192,10 +192,10 @@ def video_comments(video_id, sort=0, offset=0, lc='', secret_key=''): comments_info['error'] += '\n\n' + e.error_message comments_info['error'] += '\n\nExit node IP address: %s' % e.ip else: - comments_info['error'] = traceback.format_exc() + comments_info['error'] = 'YouTube blocked the request. IP address: %s' % e.ip except Exception as e: - comments_info['error'] = traceback.format_exc() + comments_info['error'] = 'YouTube blocked the request. IP address: %s' % e.ip if comments_info.get('error'): print('Error retrieving comments for ' + str(video_id) + ':\n' + -- cgit v1.2.3