This commit is contained in:
2025-01-12 20:19:48 -05:00
parent efe933a185
commit 725e463992
7 changed files with 155 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
#!/usr/bin/env python3.12
from .. import private
from . import common
from aiohttp import ClientTimeout, ClientSession, ClientError
class Genius:
"""Genius Search Module"""
def __init__(self):
self.genius_url = private.genius_url
self.genius_search_url = f'{self.genius_url}api/search/song?q='
self.headers = common.SCRAPE_HEADERS
self.timeout = ClientTimeout(connect=2, sock_read=2.5)
async def search(self, artist: str, song: str):
"""
@artist: the artist to search
@song: the song to search
"""