Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """
- Fetch the yt comments using this tool
- https://github.com/egbertbouman/youtube-comment-downloader
- After installing the dependencies
- Run this command
- python .\downloader.py --youtubeid WX8dswSDQqM --output file.json
- Finally run this script
- """
- texts = []
- ammount = 0;
- for line in open("file.json", encoding='utf8'):
- texts.append(line)
- size = len(texts)
- keywords = ["ttk", "revert", "5.2", "cheat", "implement", "balance", "team"]
- for line in texts:
- string = str(line).lower()
- for keyword in keywords:
- if keyword in string:
- ammount +=1
- break
- print('Total comments : ', size)
- print('Ammount of complaints : ', ammount)
- print('Percentage : {:0.2f}%'.format(ammount/size*100))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement