logging upgraded to be more annoying

This commit is contained in:
Luke Ogburn
2022-04-20 20:13:15 -04:00
parent 45402cda0b
commit 93b1d0bfea
2 changed files with 9 additions and 9 deletions

4
bot.py
View File

@@ -10,7 +10,7 @@ class bot():
# uploads media to mastodon, returns the mastodon ID
# specify mimetype of video files as "video/mp4" to avoid error
def upload_media(self, filename, mimetype=None):
logging.info(f"Uploading media {filename}")
logging.warning(f"Uploading media {filename}")
if not self.neuter:
returnval = self.masto.media_post(filename, mime_type=mimetype)
else:
@@ -26,7 +26,7 @@ class bot():
return ids
def toot(self, text, media=None):
logging.info(f"Posting:\n Text: {text}")
logging.warning(f"Posting:\n Text: {text}")
if not self.neuter:
self.masto.status_post(text, media_ids=media)
else:

View File

@@ -25,9 +25,9 @@ class scraper:
### WRAPPER METHODS
def scrape(self, place, limit=10):
logging.info(f"Scraping {self.service}: {place}... ")
logging.warning(f"Scraping {self.service}: {place}... ")
result = self.login.scrape(place, limit)
logging.info(f"Done scraping {self.service}: {place}.")
logging.warning(f"Done scraping {self.service}: {place}.")
return result
# gets posts from a gives service's places (ie, multiple subreddits or feeds)
@@ -36,10 +36,10 @@ class scraper:
# downloads a given post's media and return the locations
def download(self, post):
logging.info(f"Downloading {post.id}... ")
logging.warning(f"Downloading {post.id}... ")
if not self.neuter: self.login.download(post)
else: print(f"Neuter: would have downloaded {post} content")
logging.info(f"Done downloading {post.id}.")
logging.warning(f"Done downloading {post.id}.")
return result
# downloads a list of post's media and returns a list of the locations
@@ -52,9 +52,9 @@ class scraper:
# creates the savefile for a list of posts.
def remember(self):
logging.info(f"Remembering {self.service}...")
logging.warning(f"Remembering {self.service}...")
self.login.remember()
logging.info(f"Remembered {self.service}.")
logging.warning(f"Remembered {self.service}.")
# posts for each place if it has been a while
def keep_lively(self):
@@ -62,7 +62,7 @@ class scraper:
# posts a random post from the given place
def random_post(self, place):
logging.info(f"Getting random post for {place}")
logging.warning(f"Getting random post for {place}")
return self.login.random_post(place)
### TOOTER METHODS