WIP
This commit is contained in:
25
lyric_search_new/sources/genius.py
Normal file
25
lyric_search_new/sources/genius.py
Normal 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
|
||||
"""
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user