misc/migration related
This commit is contained in:
@ -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()
|
||||
|
@ -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",
|
||||
}
|
||||
|
@ -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()
|
||||
|
Reference in New Issue
Block a user