testingo n server
This commit is contained in:
11
autotoot.py
11
autotoot.py
@@ -5,13 +5,22 @@ import time
|
|||||||
|
|
||||||
def run(masto, service):
|
def run(masto, service):
|
||||||
# post any new posts, up to limit
|
# post any new posts, up to limit
|
||||||
|
print("a")
|
||||||
subs = service.scrape_all()
|
subs = service.scrape_all()
|
||||||
|
print("b")
|
||||||
|
i = 0
|
||||||
for sub in subs:
|
for sub in subs:
|
||||||
|
i += 1
|
||||||
|
print(f"c{i}")
|
||||||
service.toot_posts(masto, subs[sub])
|
service.toot_posts(masto, subs[sub])
|
||||||
|
print("d")
|
||||||
|
print("e")
|
||||||
service.remember()
|
service.remember()
|
||||||
|
print("f")
|
||||||
|
|
||||||
# post random if it has been a while
|
# post random if it has been a while
|
||||||
service.keep_lively()
|
service.keep_lively()
|
||||||
|
print("g")
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
# get config
|
# get config
|
||||||
@@ -26,7 +35,7 @@ def main():
|
|||||||
neuter = c["neuter"].lower() == "true"
|
neuter = c["neuter"].lower() == "true"
|
||||||
if "wait" in c:
|
if "wait" in c:
|
||||||
wait = int(c["wait"])
|
wait = int(c["wait"])
|
||||||
print(neuter, wait)
|
|
||||||
# make bots
|
# make bots
|
||||||
masto = bot(config, neuter=neuter)
|
masto = bot(config, neuter=neuter)
|
||||||
reddit = scraper("reddit", config, neuter=neuter)
|
reddit = scraper("reddit", config, neuter=neuter)
|
||||||
|
|||||||
Reference in New Issue
Block a user