diff --git a/lyricsgenius/api/api.py b/lyricsgenius/api/api.py index 5692741..38ddf48 100644 --- a/lyricsgenius/api/api.py +++ b/lyricsgenius/api/api.py @@ -37,6 +37,7 @@ class API(Sender): retries (:obj:`int`, optional): Number of retries in case of timeouts and errors with a >= 500 response code. By default, requests are only made once. user_agent (:obj:`str`, optional): User agent for the request header. + proxy (:obj:`dict[str, str]`, optional): Proxy settings. Attributes: response_format (:obj:`str`, optional): API response format (dom, plain, html). @@ -52,21 +53,21 @@ class API(Sender): def __init__(self, access_token, - proxy=None, response_format='plain', timeout=5, sleep_time=0.2, retries=0, user_agent='', + proxy=None, ): super().__init__( access_token=access_token, - proxy=proxy, response_format=response_format, timeout=timeout, sleep_time=sleep_time, retries=retries, user_agent=user_agent, + proxy=proxy, ) def account(self, text_format=None): diff --git a/lyricsgenius/api/base.py b/lyricsgenius/api/base.py index b2e8abe..60a395a 100644 --- a/lyricsgenius/api/base.py +++ b/lyricsgenius/api/base.py @@ -17,13 +17,13 @@ class Sender(object): def __init__( self, access_token=None, - proxy=None, response_format='plain', timeout=5, sleep_time=0.2, retries=0, public_api_constructor=False, user_agent='', + proxy=None, ): self._session = requests.Session() user_agent_root = f'{platform.system()} {platform.release()}; Python {platform.python_version()}' diff --git a/lyricsgenius/genius.py b/lyricsgenius/genius.py index 3cb7221..556f0bb 100644 --- a/lyricsgenius/genius.py +++ b/lyricsgenius/genius.py @@ -37,6 +37,7 @@ class Genius(API, PublicAPI): retries (:obj:`int`, optional): Number of retries in case of timeouts and errors with a >= 500 response code. By default, requests are only made once. user_agent (:obj:`str`, optional): User agent for the request header. + proxy (:obj:`dict[str, str]`, optional): Proxy settings. Attributes: verbose (:obj:`bool`, optional): Turn printed messages on or off. @@ -67,23 +68,23 @@ class Genius(API, PublicAPI): 'instrumental', 'setlist'] def __init__(self, access_token=None, - proxy=None, response_format='plain', timeout=5, sleep_time=0.2, verbose=True, remove_section_headers=False, skip_non_songs=True, excluded_terms=None, replace_default_terms=False, retries=0, user_agent='', + proxy=None, ): # Genius Client Constructor super().__init__( access_token=access_token, - proxy=proxy, response_format=response_format, timeout=timeout, sleep_time=sleep_time, retries=retries, user_agent=user_agent, + proxy=proxy, ) self.verbose = verbose