You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that the number of returned results from the search function doesn't match the count attribute of the class.
For example, the following code:
import discogs_client
client= discogs_client.Client(use_agent="USER_AGENT", user_token="USER_TOKEN")
results = client.search("Daft Punk One more time", type="master")
search_results_dicts = [result.data for result in results]
print(results.count == len(search_results_dicts))
print(results.count)
print(len(search_results_dicts))
would return:
>>> False
>>> 82
>>> 80
Interestingly, if you actually go to the Discogs webpage (in this case, that would be: https://www.discogs.com/search/?q=Daft+Punk+One+more+time&type=master) you will notice that the count specified is indeed 82 but if you count the items, you would only get to 80.
On the first page, you will see 1 out of 50 although there are only 48 items (6 items per row in 8 rows on PC) and the second one that has 32 items (from 51 to 82) and with the correct count.
Therefore, I believe that this comes from the Discogs API rather than the package itself.
Hope this help with further development!
The text was updated successfully, but these errors were encountered:
Hi and thanks for the detailed report. That is indeed very interesing 😮
To confirm your assumption that this is returned by api.discogs.com already, have you tried using a low level tool like curl and compared with that result as well?
Hi everyone!
I've noticed that the number of returned results from the search function doesn't match the count attribute of the class.
For example, the following code:
would return:
Interestingly, if you actually go to the Discogs webpage (in this case, that would be: https://www.discogs.com/search/?q=Daft+Punk+One+more+time&type=master) you will notice that the count specified is indeed 82 but if you count the items, you would only get to 80.
On the first page, you will see 1 out of 50 although there are only 48 items (6 items per row in 8 rows on PC) and the second one that has 32 items (from 51 to 82) and with the correct count.
Therefore, I believe that this comes from the Discogs API rather than the package itself.
Hope this help with further development!
The text was updated successfully, but these errors were encountered: