Advertisement
Guest User

Untitled

a guest
Jan 28th, 2020
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.78 KB | None | 0 0
  1. """
  2. Fetch the yt comments using this tool
  3.  
  4. https://github.com/egbertbouman/youtube-comment-downloader
  5.  
  6. After installing the dependencies
  7.  
  8. Run this command
  9.  
  10. python .\downloader.py --youtubeid WX8dswSDQqM --output file.json
  11.  
  12. Finally run this script
  13. """
  14.  
  15. texts = []
  16. ammount = 0;
  17.  
  18. for line in open("file.json", encoding='utf8'):
  19.     texts.append(line)
  20.  
  21. size = len(texts)
  22.  
  23. for line in texts:
  24.     if ('ttk' in str(line).lower() or 'revert'  in str(line).lower() or '5.2' in str(line).lower() or 'cheat' in str(line).lower() or 'implement' in str(line).lower() or 'balance' in str(line).lower() or 'team' in str(line).lower() ):
  25.         ammount +=1
  26. print('Total comments : ', size)
  27. print('Ammount of complaints : ', ammount)
  28. print('Percentage : {:0.2f}%'.format(ammount/size*100))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement