Include "import pylast" in both blocks

This commit is contained in:
Hugo van Kemenade 2023-01-06 09:49:52 +02:00 committed by GitHub
parent 8647cbdd48
commit f5ea06c6c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -90,6 +90,8 @@ Alternatively, instead of creating `network` with a username and password,
you can authenticate with a session key:
```python
import pylast
SESSION_KEY_FILE = os.path.join(os.path.expanduser("~"), ".session_key")
network = pylast.LastFMNetwork(API_KEY, API_SECRET)
if not os.path.exists(SESSION_KEY_FILE):