From 72d9619a1a885b524735c563dd4488a4a4d1c724 Mon Sep 17 00:00:00 2001 From: Henry Hansen Date: Mon, 6 Nov 2023 23:41:13 -0800 Subject: [PATCH 1/3] Added example for getting artists img with name --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index aff9a396..3b07c052 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,25 @@ for idx, item in enumerate(results['items']): print(idx, track['artists'][0]['name'], " – ", track['name']) ``` +## Example of getting artist image with artist's name + +import spotipy +import sys +from spotipy.oauth2 import SpotifyClientCredentials + +spotify = spotipy.Spotify(auth_manager=SpotifyClientCredentials()) + +if len(sys.argv) > 1: + name = ' '.join(sys.argv[1:]) +else: + name = 'Radiohead' + +results = spotify.search(q='artist:' + name, type='artist') +items = results['artists']['items'] +if len(items) > 0: + artist = items[0] + print(artist['name'], artist['images'][0]['url']) + ## Reporting Issues For common questions please check our [FAQ](FAQ.md). From 4dcfde4b2e5caf8c4e6db532ee64f68cc5c0b9c9 Mon Sep 17 00:00:00 2001 From: Henry Hansen Date: Tue, 12 Dec 2023 21:25:21 -0800 Subject: [PATCH 2/3] 817 imporvments to README regarding bug reports --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index 3b07c052..7868c7fb 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,25 @@ You can ask questions about Spotipy on [Stack Overflow](http://stackoverflow.com/questions/ask). Don’t forget to add the *Spotipy* tag, and any other relevant tags as well, before posting. +### Reporting Bugs + If you have suggestions, bugs or other issues specific to this library, file them [here](https://github.com/plamere/spotipy/issues). Or just send a pull request. + +When reporting a bug please fill out all the given fields: +**Describe the bug** +A clear and concise description of what the bug is and where/when it occured. Does the program terminate? Is the retrived information correct? Which endpoints are you making a call to? Include formatted text, not screen shots. + +**Your code** +Share a complete minimal working example. Include libraries used. + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Output** +Paste and format errors (with complete stacktrace) or logs. Make sure to remove sensitive information. + +You can find these catagories by navagating to the bug report [link](https://github.com/plamere/spotipy/issues) then selecting "New issue" and then "Get started" next to Bug Report on the following page. + +Please fill out all above fields. The information helps identify bugs faster, enabling bug patches to be released faster. Leaving any field blank may resort in your report going unanswered. \ No newline at end of file From d0f68f6c3ce9c91c23fdbe0076643089cf6362bc Mon Sep 17 00:00:00 2001 From: Henry Hansen Date: Tue, 12 Dec 2023 21:33:57 -0800 Subject: [PATCH 3/3] minor formatting changes in README --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7868c7fb..5d8f1c89 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,7 @@ for idx, item in enumerate(results['items']): ## Example of getting artist image with artist's name +```python import spotipy import sys from spotipy.oauth2 import SpotifyClientCredentials @@ -84,7 +85,7 @@ items = results['artists']['items'] if len(items) > 0: artist = items[0] print(artist['name'], artist['images'][0]['url']) - +``` ## Reporting Issues For common questions please check our [FAQ](FAQ.md).