mirror of
https://github.com/Aran404/SpotAPI.git
synced 2026-04-25 16:55:50 +03:00
[GH-ISSUE #9] Episode (podcast) info #65
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/SpotAPI#65
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @noembryo on GitHub (Dec 12, 2024).
Original GitHub issue: https://github.com/Aran404/SpotAPI/issues/9
This is more of a question (or a feature request).
Is it possible to get info from an episode link like
https://open.spotify.com/episode/5CZlLoGOibAGX9oLh26YEk?Anyway, thank you for your library and your time.
It's been a life saver.. 👍
@Aran404 commented on GitHub (Dec 12, 2024):
The current API does not support it. I'll add this feature request to my TODO. Thanks.
@noembryo commented on GitHub (Dec 12, 2024):
Thank you..
@Aran404 commented on GitHub (Dec 12, 2024):
Do you think it would be more suitable to make a "PublicInfo" class that has all the paginators that don't require authentication? Or just keep it in it's respectable file?
@noembryo commented on GitHub (Dec 12, 2024):
Yes, I think one class could be really handy.. 💯
@Aran404 commented on GitHub (Dec 12, 2024):
I thought that as well, I'll just point to the function in the original class to have backwards compatibility.
@noembryo commented on GitHub (Dec 12, 2024):
Great! Waiting for the update.. 😃
@Aran404 commented on GitHub (Dec 14, 2024):
I've added the suggestions you requested, please test and let me know if there any issues.
@noembryo commented on GitHub (Dec 14, 2024):
Nice.. It is almost a drop-in replacement, but has a few differences.
PublicPlaylistfrompublicand doinginfo = play_list.get_playlist_info(limit=343)["data"]["playlistV2"]produces an error, but if I import fromspotapi.playlistit works.To fix it I have to do
PublicAlbumfrompublicand doinginfo = album.get_album_info(limit=343)["data"]["albumUnion"]produces an error, but if I import fromspotapi.albumit works.To fix it I have to do
info = album.get_album_info()["data"]["albumUnion"]Trying to get the playlist info using
info = list(Public().playlist_info(url))[0]works fine and I can get all the items withitems = [item for sublist in info for item in sublist["items"]], but unfortunatelyinfodoes not include the playlist's title that I previously got withinfo["name"]The same applies to the albums. Getting the items with
info = Public().album_info(url)returns a generator for the album items, but there is no way to get the album's title that I use to get withalb_title = info["name"].For the podcast part now.
I had no success with the test link I use.
info = Public().podcast_episode_info(url), I get a generator with this{'data': {'episodeUnionV2': {'__typename': 'GenericError'}}, 'extensions': {}}in it.These are my first observations. I'll keep investigating.. 🤓
🙏
@Aran404 commented on GitHub (Dec 14, 2024):
Well, Public provides the paginators of the objects which has stayed the same from Version 1.1.1 and Version 1.1.2. I think you are confusing pagination (which parses the information somewhat) and getting the raw data. Also Public is a class full of static methods so what you'd do is Public.(methodhere).
@noembryo commented on GitHub (Dec 14, 2024):
Well, my bad. Although
Public.podcast_episode_info(url)uses the class' static method andPublic().podcast_episode_info(url)uses one instance's static method, the outcome is the same generator with the same error.And since I'm using the library in a somewhat wrong way, can you please tell me what is the intended way to get the data for a playlist, an album or a podcast?
Thank you for your help..
@Aran404 commented on GitHub (Dec 14, 2024):
To get the raw data, just use it the normal way by importing the specific class you want to use. Public just acts as an atlas to the underlying methods.
@noembryo commented on GitHub (Dec 14, 2024):
A, OK.
Did you see the podcast's error?
@Aran404 commented on GitHub (Dec 14, 2024):
Yes I did, Issue #10 mentions it, will work up a fix when I'm home.
@noembryo commented on GitHub (Dec 14, 2024):
Oh, thank you. I'll monitor it there.. 🙏
@noembryo commented on GitHub (Dec 15, 2024):
Is the fix that you mention there published?
Because I can't see an update..
@Aran404 commented on GitHub (Dec 15, 2024):
Yeah it is.
@noembryo commented on GitHub (Dec 15, 2024):
Well, the most recent release I see, is the 1.1.2, but this is the one I got more than a couple of days ago.
Looking at the dates though, it seems that this 1.1.2 was released yesterday.
Should I remove and re-install the same version?
@afkarxyz commented on GitHub (Dec 15, 2024):
I think he hasn't bumped to version 1.1.3, I downloaded the repository manually without going through pip.
@noembryo commented on GitHub (Dec 15, 2024):
Thank you. 🙏
I'll try with the re-install..
@noembryo commented on GitHub (Dec 15, 2024):
Nope, still the same error.
Tried uninstalling and re-installing from PyPi
Tried uninstalling and installing from GitHub
I must be doing something wrong.
How can I get the raw data for an episode like this
https://open.spotify.com/episode/5CZlLoGOibAGX9oLh26YEk?@afkarxyz commented on GitHub (Dec 15, 2024):
You can try my project here https://github.com/afkarxyz/spotifyapis or go directly here https://spotifyapis.vercel.app/
@noembryo commented on GitHub (Dec 15, 2024):
I see that you're using the paginators from
Public, but I was looking for a way to do it like I get the raw playlist data.Something like
I'll have to read more of your project later, but I was hopping for 2-3 lines of code that get the podcast's data..
@noembryo commented on GitHub (Dec 15, 2024):
@afkarxyz Also trying to get the info for my testcase from https://spotifyapis.vercel.app/ returns a 404..
@afkarxyz commented on GitHub (Dec 15, 2024):
Try this https://spotifyapis.vercel.app/episode/5CZlLoGOibAGX9oLh26YEk
@noembryo commented on GitHub (Dec 15, 2024):
So, how can I get this too?
Edit: A, got it.. The ID..
@Aran404 commented on GitHub (Dec 15, 2024):
Sorry about that, 1.1.3 is out now on PyPi.