Move id = comment[id] in treatComment(comment) to an inner scope

This commit is contained in:
Benjamin Loison 2023-05-16 00:56:19 +02:00
parent 08a9880a58
commit 2888f5973d
No known key found for this signature in database

View File

@ -19,9 +19,9 @@ nextPageToken = ''
commentRegexCompiled = re.compile(COMMENT_REGEX)
def treatComment(comment):
id = comment['id']
textOriginal = comment['snippet']['textOriginal']
if commentRegexCompiled.search(textOriginal):
id = comment['id']
url = f'https://www.youtube.com/watch?v={VIDEO_ID}&lc={id}'
print(f'{url} {textOriginal}')
if OPEN_IN_FIREFOX: