From ba37d6a111eb6dd04c9363fe745df7c175ba7ec1 Mon Sep 17 00:00:00 2001 From: Benjamin Loison Date: Sat, 7 Jan 2023 15:45:31 +0100 Subject: [PATCH] Make all Python scripts executable and add `findAlreadyTreatedCommentsCount.py` to find how many comments were already treated --- findAlreadyTreatedCommentsCount.py | 12 ++++++++++++ findLatestTreatedCommentsForChannelsBeingTreated.py | 0 findTreatedChannelWithMostComments.py | 0 findTreatedChannelWithMostSubscribers.py | 0 removeChannelsBeingTreated.py | 0 retrieveTop100SubscribersFrance.py | 0 6 files changed, 12 insertions(+) create mode 100755 findAlreadyTreatedCommentsCount.py mode change 100644 => 100755 findLatestTreatedCommentsForChannelsBeingTreated.py mode change 100644 => 100755 findTreatedChannelWithMostComments.py mode change 100644 => 100755 findTreatedChannelWithMostSubscribers.py mode change 100644 => 100755 removeChannelsBeingTreated.py mode change 100644 => 100755 retrieveTop100SubscribersFrance.py diff --git a/findAlreadyTreatedCommentsCount.py b/findAlreadyTreatedCommentsCount.py new file mode 100755 index 0000000..7fc6ad9 --- /dev/null +++ b/findAlreadyTreatedCommentsCount.py @@ -0,0 +1,12 @@ +#!/usr/bin/python3 + +PREFIX = 'Comments per second: ' +alreadyTreatedCommentsCount = 0 + +with open('nohup.out') as f: + lines = f.read().splitlines() + for line in lines: + if PREFIX in line: + alreadyTreatedCommentsCount += int(line.split(PREFIX)[-1]) + +print(alreadyTreatedCommentsCount) diff --git a/findLatestTreatedCommentsForChannelsBeingTreated.py b/findLatestTreatedCommentsForChannelsBeingTreated.py old mode 100644 new mode 100755 diff --git a/findTreatedChannelWithMostComments.py b/findTreatedChannelWithMostComments.py old mode 100644 new mode 100755 diff --git a/findTreatedChannelWithMostSubscribers.py b/findTreatedChannelWithMostSubscribers.py old mode 100644 new mode 100755 diff --git a/removeChannelsBeingTreated.py b/removeChannelsBeingTreated.py old mode 100644 new mode 100755 diff --git a/retrieveTop100SubscribersFrance.py b/retrieveTop100SubscribersFrance.py old mode 100644 new mode 100755