Update export statistics
This commit is contained in:
parent
a43c13c2e5
commit
5a77cf9687
BIN
dist/Ragnar-1.3.37-py3-none-any.whl
vendored
BIN
dist/Ragnar-1.3.37-py3-none-any.whl
vendored
Binary file not shown.
BIN
dist/ragnar-1.3.37.tar.gz
vendored
BIN
dist/ragnar-1.3.37.tar.gz
vendored
Binary file not shown.
@ -173,6 +173,6 @@ class Bot:
|
|||||||
self.rant_history.append(rant["id"])
|
self.rant_history.append(rant["id"])
|
||||||
|
|
||||||
def down_vote_rant(self, rant):
|
def down_vote_rant(self, rant):
|
||||||
vic.dr_downvote_rant(rant["id"],5)
|
vic.dr_downvote_rant(rant["id"], 5)
|
||||||
log.warning("Downvoting rant by {} for 5 times.".format(rant["user_username"]))
|
log.warning("Downvoting rant by {} for 5 times.".format(rant["user_username"]))
|
||||||
log.debug("Vote result: ".format(self.api.post_rant_vote(rant["id"], -1)))
|
log.debug("Vote result: ".format(self.api.post_rant_vote(rant["id"], -1)))
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import argparse
|
import argparse
|
||||||
from concurrent.futures import ThreadPoolExecutor as Executor
|
import time
|
||||||
|
|
||||||
from ragnar import log
|
from ragnar import log
|
||||||
from ragnar.bot import Bot
|
from ragnar.bot import Bot
|
||||||
from ragnar.victoria import vic
|
from ragnar.victoria import vic
|
||||||
import time
|
|
||||||
|
|
||||||
def parse_args():
|
def parse_args():
|
||||||
parser = argparse.ArgumentParser(description="Process username and password.")
|
parser = argparse.ArgumentParser(description="Process username and password.")
|
||||||
@ -15,7 +15,6 @@ def parse_args():
|
|||||||
return parser.parse_args()
|
return parser.parse_args()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
args = parse_args()
|
args = parse_args()
|
||||||
usernames = vic.get_friends()
|
usernames = vic.get_friends()
|
||||||
@ -31,8 +30,9 @@ def main():
|
|||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
log.critical(ex, exc_info=True)
|
log.critical(ex, exc_info=True)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
time_duration = time.time() - time_start
|
time_duration = time.time() - time_start
|
||||||
log.info(f"Bot {username} finished in {time_duration} seconds.")
|
log.info(f"Bot {username} finished in {time_duration} seconds.")
|
||||||
|
|
||||||
|
|
||||||
def run():
|
def run():
|
||||||
main()
|
main()
|
||||||
|
Loading…
Reference in New Issue
Block a user