misc/migration related

This commit is contained in:
2025-06-08 08:53:18 -04:00
parent 68408c4796
commit 4cdd6d0c99
13 changed files with 90 additions and 28 deletions

View File

@ -22,7 +22,7 @@ class Cache:
def __init__(self) -> None:
self.cache_db: Union[str, LiteralString] = os.path.join(
"/mnt/data/share", "sqlite_dbs", "cached_lyrics.db"
"/usr/local/share", "sqlite_dbs", "cached_lyrics.db"
)
self.redis_cache = redis_cache.RedisCache()
self.notifier = notifier.DiscordNotifier()

View File

@ -1,4 +1,7 @@
SCRAPE_HEADERS: dict[str, str] = {
"accept": "*/*",
"Accept-Encoding": "gzip, deflate, br, zstd",
"Accept-Language": "en-US,en;q=0.5",
"Connection": "keep-alive",
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0",
}

View File

@ -57,6 +57,7 @@ class Genius:
timeout=self.timeout,
headers=self.headers,
verify_ssl=False,
proxy=private.GENIUS_PROXY,
) as request:
request.raise_for_status()
text: Optional[str] = await request.text()
@ -112,6 +113,7 @@ class Genius:
timeout=self.timeout,
headers=self.headers,
verify_ssl=False,
proxy=private.GENIUS_PROXY,
) as scrape_request:
scrape_request.raise_for_status()
scrape_text: Optional[str] = await scrape_request.text()