Skip to content

Commit

Permalink
get_signatureTimestamp: change return type to int (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
sigma67 committed May 23, 2021
1 parent f1fe476 commit f8e9d17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ytmusicapi/mixins/browsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ def get_basejs_url(self):
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`.
Expand All @@ -776,4 +776,4 @@ def get_signatureTimestamp(self, url: str = None):
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))

0 comments on commit f8e9d17

Please sign in to comment.