config.py 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import os
  2. from dotenv import load_dotenv
  3. load_dotenv()
  4. # Feed params
  5. FEED_UPDATE_INTERVAL = 30 # minutes
  6. YT_CHANNEL_ID = 'UCJAlTwrkQWgpIc5oRo-ryOw'
  7. SUITABLE_VIDEO_TITLES = ['БГ', 'ШБ', 'Воскресная'] # video title starts with. Leave empty list if you want to take
  8. # any videos. if you need change func is_suitable_video bellow
  9. # telegram
  10. BOT_TOKEN = os.getenv('TELEGRAM_BOT_TOKEN')
  11. CHANNEL_ID = os.getenv('CHANNEL_ID')
  12. AGENT_ID = os.getenv('AGENT_ID')
  13. ENTITY = 'HK Minsk Audio bot' # any session name
  14. # BOT_NAME = 'minsk_hk_bot'
  15. BOT_NAME = 'Granky_bot'
  16. PHONE = os.getenv('PHONE')
  17. API_HASH = os.getenv('API_HASH')
  18. API_ID = os.getenv('API_ID')
  19. # mp3 config
  20. GENRE = 'Кришна катха'
  21. ALBUM_NAME = 'Лекции Минского храма Кришны'
  22. DEFAULT_SPEAKER_NAME = 'Дас'
  23. CUSTOM_DESCRIPTION = 'Лекции @newjaipur' # below mp3 file in the channel
  24. # ===== change it if you need and you know what you do =====
  25. def is_suitable_video(title):
  26. print(title)
  27. if len(SUITABLE_VIDEO_TITLES):
  28. for item in SUITABLE_VIDEO_TITLES:
  29. if title[0:len(item)] == item:
  30. return True
  31. else:
  32. return True
  33. return False