def _get_text(self):
        """
        Get the current song metadatas (artist - title)
        """
        bus = dbus.SessionBus()
        try:
            self.__bus = bus.get_object(self.dbus_client, "/org/mpris/MediaPlayer2")
            self.player = dbus.Interface(self.__bus, "org.freedesktop.DBus.Properties")

            try:
                metadata = self.player.Get("org.mpris.MediaPlayer2.Player", "Metadata")
                album = metadata.get("xesam:album")
                artist = metadata.get("xesam:artist")[0]
                microtime = metadata.get("mpris:length")
                rtime = str(timedelta(seconds=microtime // 1_000_000))
                title = metadata.get("xesam:title")
                playback_status = self._get_playback_status()
                if playback_status == "Playing":
                    color = self.py3.COLOR_PLAYING or self.py3.COLOR_GOOD
                else:
                    color = self.py3.COLOR_PAUSED or self.py3.COLOR_DEGRADED
            except Exception:
                return (
                    self.format_stopped,
                    self.py3.COLOR_PAUSED or self.py3.COLOR_DEGRADED,
                )

            spotify_data = {
                "title": title,
                "artist": artist,
                "album": album,
                "time": rtime,
                "playback": playback_status,
            }

            for x in self.replacements_init:
                if x in spotify_data:
                    spotify_data[x] = self.py3.replace(spotify_data[x], x)

            return (self.py3.safe_format(self.format, spotify_data), color)
        except Exception:
            return (self.format_down, self.py3.COLOR_OFFLINE or self.py3.COLOR_BAD)

        Get the current song metadatas (artist - title)
        
py3status/modules/spotify.py