appears to be working
This commit is contained in:
parent
f20aa9b0d8
commit
a51cb7410b
3 changed files with 32 additions and 5 deletions
|
|
@ -4,6 +4,10 @@ from collections import defaultdict
|
|||
from datetime import datetime, timedelta
|
||||
|
||||
def lf_request(method, **params):
|
||||
# Fixa 'from_' → 'from' och 'to_' → 'to' (Last.fm accepterar inte Python-säkra namn)
|
||||
for alt, real in (("from_", "from"), ("to_", "to")):
|
||||
if alt in params:
|
||||
params[real] = params.pop(alt)
|
||||
url = "https://ws.audioscrobbler.com/2.0/"
|
||||
params.update({
|
||||
"method": method,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue