Browse Source

Fix stderr logging, clean up empty genre

main
fluffy 6 months ago
parent
commit
8c35a4c44d
2 changed files with 5 additions and 2 deletions
  1. +3
    -0
      beatbot.log
  2. +2
    -2
      beatbot.py

+ 3
- 0
beatbot.log View File

@@ -8,3 +8,6 @@ INFO:__main__:genre=acid verb1=slate verb2=zonda search=https://www.youtube.com/
https://youtube.com/watch?v=tBDVLey1DIE
[2021-04-29T09:56:52] DEBUG [urllib3.connectionpool._new_conn:971] Starting new HTTPS connection (1): botsin.space:443
[2021-04-29T09:56:52] DEBUG [urllib3.connectionpool._make_request:452] https://botsin.space:443 "GET /api/v1/instance/ HTTP/1.1" 200 None
[2021-04-29T10:09:53] INFO [__main__.bot:72] lo-fi beats to stum and juggle to

https://youtube.com/watch?v=Loi731DwqbM

+ 2
- 2
beatbot.py View File

@@ -9,7 +9,7 @@ import requests

logging.basicConfig(
handlers=[logging.handlers.RotatingFileHandler('beatbot.log', maxBytes=100000, backupCount=10),
logging.handlers.StreamHandler()],
logging.StreamHandler()],
level=logging.INFO,
format="[%(asctime)s] %(levelname)s [%(name)s.%(funcName)s:%(lineno)d] %(message)s",
datefmt='%Y-%m-%dT%H:%M:%S')
@@ -31,7 +31,7 @@ def bot():
verb2 = randline('2syllableverbs.txt')

search_term = f'+lofi {genre} +beats {verb1} {verb2}'
text = f"lo-fi {genre} beats to {verb1} and {verb2} to"
text = f"lo-fi {genre} beats to {verb1} and {verb2} to".replace(' ', ' ')

try:
with open('seen-vids.dat', 'rb') as seen:


Loading…
Cancel
Save