memoryfm.from_spotify_zip#
- memoryfm.from_spotify_zip(file, username=None, tz=None, min_duration_ms=60000)#
Create a ScrobbleLog from a Spotify listening history zip.
- Parameters:
- filePathLike or TextIOBase object.
A pathlib path, or
A string corresponding to a path, such as
/home/username/Documents/filename, orA TextIOBase object having a
read()method.
The file is expected to be a Spotify listening history zip file.
- usernamestr, default None
A string representing username. Spotify export exports may not include the username. If no username is passed, then it will be set to None.
- tzstr, default None
IANA Timezone string.
If not passed, attempt to use
tzlocal.get_localzone_nameto calculate it. Iftzlocalis not found, default to ‘Etc/UTC’.- min_duration_msint, default 60000
An integer representing the minimum duration played in milliseconds. Any listen with duration less than
min_duration_msshall be discarded and not included in the ScrobbleLog. Set to 60000 (1 minute) by default.
- Returns:
- ScrobbleLog