oops
This commit is contained in:
parent
b532238d80
commit
0359926106
@ -207,7 +207,7 @@ class LastFM:
|
|||||||
'err': 'Invalid/no artist_id specified.',
|
'err': 'Invalid/no artist_id specified.',
|
||||||
}
|
}
|
||||||
|
|
||||||
req_url: str = f"{self.api_base_url}artists/{artist_id}"
|
req_url: str = f"{self.api_base_url}/artists/{artist_id}"
|
||||||
|
|
||||||
request_params: list[tuple] = [
|
request_params: list[tuple] = [
|
||||||
("key", self.creds.get('key')),
|
("key", self.creds.get('key')),
|
||||||
@ -288,9 +288,6 @@ class LastFM:
|
|||||||
'err': 'Invalid artist/album pair',
|
'err': 'Invalid artist/album pair',
|
||||||
}
|
}
|
||||||
|
|
||||||
req_url: str = f"{self.api_base_url}album.getinfo&artist={artist}&album={album}\
|
|
||||||
&api_key={self.creds.get('key')}&autocorrect=1&format=json"
|
|
||||||
|
|
||||||
request_params: list[tuple] = [
|
request_params: list[tuple] = [
|
||||||
("method", "album.getinfo"),
|
("method", "album.getinfo"),
|
||||||
("artist", artist),
|
("artist", artist),
|
||||||
@ -300,7 +297,7 @@ class LastFM:
|
|||||||
("format", "json"),
|
("format", "json"),
|
||||||
]
|
]
|
||||||
async with ClientSession() as session:
|
async with ClientSession() as session:
|
||||||
async with await session.get(req_url,
|
async with await session.get(self.api_base_url,
|
||||||
params=request_params,
|
params=request_params,
|
||||||
timeout=ClientTimeout(connect=3, sock_read=8)) as request:
|
timeout=ClientTimeout(connect=3, sock_read=8)) as request:
|
||||||
request.raise_for_status()
|
request.raise_for_status()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user