From f2e73bbda2e49c340b44102a2f30182ccd3ec3a3 Mon Sep 17 00:00:00 2001 From: Luke Ogburn <21106956+logburn@users.noreply.github.com> Date: Wed, 13 Apr 2022 13:25:11 -0400 Subject: [PATCH] removed neuter settings --- bot.py | 12 +++--------- scraper.py | 2 +- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/bot.py b/bot.py index 2c11cff..7a45bf0 100644 --- a/bot.py +++ b/bot.py @@ -3,7 +3,7 @@ import logging # Mastodon bot to post things class bot(): - def __init__(self, config, neuter=False): + def __init__(self, config): self.masto = Mastodon(access_token=config["mastodon"]["access_token"], api_base_url=config["mastodon"]["host"]) # uploads media to mastodon, returns the mastodon ID @@ -16,15 +16,9 @@ class bot(): def upload_all_media(self, filenames): ids = [] for fn in filenames: - if not self.neuter: - ids.append(self.upload_media(fn)) - else: - print(f"Would have uploaded {fn}") + ids.append(self.upload_media(fn)) return ids def toot(self, text, media=None): logging.info(f"Posting:\n Text: {text}") - if not self.neuter: - self.masto.status_post(text, media_ids=media) - else: - print(f"Would have tooted: {text}") + self.masto.status_post(text, media_ids=media) diff --git a/scraper.py b/scraper.py index 84b142b..38e104e 100644 --- a/scraper.py +++ b/scraper.py @@ -35,7 +35,7 @@ class scraper: # downloads a given post's media and return the locations def download(self, post): logging.info(f"Downloading {post.id}... ") - result = [] #self.login.download(post) neuter + self.login.download(post) logging.info(f"Done downloading {post.id}.") return result