get_song: fix signatureTimestamp (#196)

This commit is contained in:
sigma67 2021-05-21 21:44:09 +02:00
commit 5d59a09751
No known key found for this signature in database
GPG key ID: 1545A01D4474BAF0
2 changed files with 12 additions and 2 deletions

View file

@ -3,6 +3,7 @@ import json
from http.cookies import SimpleCookie
from hashlib import sha1
import time
from datetime import date
from functools import wraps
import locale
from ytmusicapi.constants import *
@ -102,6 +103,10 @@ def get_authorization(auth):
return "SAPISIDHASH " + unix_timestamp + "_" + sha_1.hexdigest()
def get_datestamp():
return (date.today() - date.fromtimestamp(0)).days
def to_int(string):
number_string = string.split(' ')[0]
try: