diff --git a/scrobble.py b/scrobble.py index 32db791..ba2ae6d 100644 --- a/scrobble.py +++ b/scrobble.py @@ -1,4 +1,4 @@ -import pylast,random,re,sys,time +import pylast,random,re,sys,time,requests import albums network = pylast.LastFMNetwork(api_key=albums.apikey, api_secret=albums.apisecret, username="litrovers", password_hash=pylast.md5(albums.pw)) # https://input.sh/scrobbling-live-sets-into-last-fm-using-python/ @@ -32,6 +32,10 @@ def scrobble(thealbum): else: if tracklist[item] > 29: last_api_call = network.scrobble(theartist,thetrack,int(time.time())) + try: + requests.post("https://ple.praze.net/api/v1/pleroma/scrobble",data = {"artist":theartist,"length":int(time.time()),"title":thetrack},auth = ("tre",albums.plepass)) + except: + pass print("Scrobbled " + thetrack) else: print("Skipped " + thetrack)