aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroot <root@localhost.localdomain>2020-09-05 22:32:50 +0100
committerroot <root@localhost.localdomain>2020-09-05 22:32:50 +0100
commitb4817b94bd6d4c1e177fe55201bf0da0f335de75 (patch)
tree50bc92c3c63533714ff9a4edb1cf29d32e653c06
parentebc74eb418ce3728624dbb36df60d5b645b2aaf5 (diff)
downloadyaoi-communism-b4817b94bd6d4c1e177fe55201bf0da0f335de75.tar.gz
yaoi-communism-b4817b94bd6d4c1e177fe55201bf0da0f335de75.zip
added running the program as a cron job
-rw-r--r--bot.py9
-rw-r--r--requirements.txt4
2 files changed, 6 insertions, 7 deletions
diff --git a/bot.py b/bot.py
index 27a5f3a..7e3c6f7 100644
--- a/bot.py
+++ b/bot.py
@@ -1,3 +1,6 @@
+import os
+os.chdir("/root/yaoi-communism")
+
from twython import Twython
import get_images
@@ -13,8 +16,4 @@ def post():
get_images.logging.info("Posted to twitter.")
if __name__ == "__main__":
- import time
-
- while True:
- post()
- time.sleep(60*60)
+ post()
diff --git a/requirements.txt b/requirements.txt
index 325cb7d..cc0f624 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,8 +1,8 @@
Shapely==1.7.1
colorthief==0.2.1
-opencv_python==4.1.1.26
+opencv_python_headless
requests==2.18.4
lxml==4.5.2
-dataclasses==0.7
+dataclasses
Pillow==7.2.0
twython==3.8.2