From f8e9d175860d63cc1ae3b3b8443ba1316f0b50d1 Mon Sep 17 00:00:00 2001 From: sigma67 Date: Sun, 23 May 2021 20:58:54 +0200 Subject: [PATCH] get_signatureTimestamp: change return type to int (#198) --- ytmusicapi/mixins/browsing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ytmusicapi/mixins/browsing.py b/ytmusicapi/mixins/browsing.py index 8537e9b..eb00403 100644 --- a/ytmusicapi/mixins/browsing.py +++ b/ytmusicapi/mixins/browsing.py @@ -761,7 +761,7 @@ class BrowsingMixin: raise Exception("Could not identify the URL for base.js player.") return YTM_DOMAIN + match.group(1) - def get_signatureTimestamp(self, url: str = None): + def get_signatureTimestamp(self, url: str = None) -> int: """ Fetch the `base.js` script from YouTube Music and parse out the `signatureTimestamp` for use with :py:func:`get_song`. @@ -776,4 +776,4 @@ class BrowsingMixin: match = re.search(r"signatureTimestamp[:=](\d+)", response) if match is None: raise Exception("Unable to identify the signatureTimestamp.") - return match.group(1) + return int(match.group(1))