meme/misc/rm karma

This commit is contained in:
2025-05-20 11:14:08 -04:00
parent 5c351a6e0f
commit 0d58ae2a96
8 changed files with 67 additions and 299 deletions

View File

@ -28,13 +28,13 @@ class Genius:
self.genius_url: str = private.GENIUS_URL
self.genius_search_url: str = f"{self.genius_url}api/search/song?q="
self.headers: dict = common.SCRAPE_HEADERS
self.timeout = ClientTimeout(connect=2, sock_read=5)
self.timeout = ClientTimeout(connect=3, sock_read=3)
self.datautils = utils.DataUtils()
self.matcher = utils.TrackMatcher()
self.cache = cache.Cache()
self.redis_cache = redis_cache.RedisCache()
@retry(stop=stop_after_attempt(2), wait=wait_fixed(0.5))
@retry(stop=stop_after_attempt(3), wait=wait_fixed(0.2))
async def search(self, artist: str, song: str, **kwargs) -> Optional[LyricsResult]:
"""
Genius Search