how can i pull a picture directly from song album ?

so the idea is to put a song album picture in this box but is it possible that i can directly pull that picture from song's link ? or something like this ?
No description
24 Replies
Jochem
Jochem2mo ago
that's literally unanswerable without more information the API you're using may or may not supply cover images
peterpumkineaterr
peterpumkineaterrOP2mo ago
i'm not using any api it's a section on my portfolio website where i'm shoing what i'm listning to and what i'm reading so i don't want to put picture there manually that's why i was thinking that if it's there any way that i can use default album art by link
Jochem
Jochem2mo ago
what do you mean by default album art? just the same picture for everything? and what link?
peterpumkineaterr
peterpumkineaterrOP2mo ago
this is the default album art on apple music
No description
peterpumkineaterr
peterpumkineaterrOP2mo ago
no apple music link this is how it suppose to look
Jochem
Jochem2mo ago
you'd have to use the apple music api https://developer.apple.com/documentation/applemusicapi
Apple Developer Documentation
Apple Music API | Apple Developer Documentation
Integrate streaming music with catalog and personal content.
Jochem
Jochem2mo ago
it's likely not safe to use on the frontend, so you'd have to do the fetching on the backend no way to do that with just HTML and SASS though
peterpumkineaterr
peterpumkineaterrOP2mo ago
oh dang i'm afraid of backend what exactly i will have to do ?
Jochem
Jochem2mo ago
create an API yourself that your frontend will consume, and have that API proxy requests to the apple music service so your access tokens aren't exposed to your end users there's some services online that do that for you I think? You can also use edge functions for that, or so I've heard. But yeah, you generally shouldn't use third party APIs on the frontend directly unless it's very explicitly stated in the documentation of the API that it is safe to do so
peterpumkineaterr
peterpumkineaterrOP2mo ago
so enlighten me with back end which language i will be using ?
Jochem
Jochem2mo ago
entirely up to you and the host you pick php, javascript, python, perl, go, rust, java, whichever you prefer
glutonium
glutonium2mo ago
pure C
peterpumkineaterr
peterpumkineaterrOP2mo ago
it's portfolio website. and i only know html scss that's it never been to backend so what do you think which language i should be using ?
Jochem
Jochem2mo ago
I'd honestly recommend just not including that feature then php and javascript are the most common backend languages, with PHP far outpacing the adoption of javascript still you can use javascript on the frontend too though, so there's something to be said for using that rather than php
peterpumkineaterr
peterpumkineaterrOP2mo ago
i'll do one thing i'ma get my whole website ready as that's the first priority then i will improve the whole website bit by bit
ἔρως
ἔρως2mo ago
well, instead of trying to do your own and possibly showing that you may be committing copyright infringement, how about you just use spotify? spotify can be embed into a website
Jochem
Jochem2mo ago
I mean, using apple music's api isn't committing copyright infringement I'd personally be careful about a "now listening" on my portfolio though you never know what kind of weird prejudices hiring managers have
ἔρως
ἔρως2mo ago
i know, but he's trying to avoid doing backend stuff and by not using the api, and going around it, it can be illegal redistribution of the album art and music even if it is a sample copyright is hell, so, better not risk it
Jochem
Jochem2mo ago
that is fair, yeah
ἔρως
ἔρως2mo ago
that is why i suggested a spotify playlist the result is the same, minus copyright infringement
peterpumkineaterr
peterpumkineaterrOP2mo ago
Aight then i’ll try spotify
ἔρως
ἔρως2mo ago
try it, but make a playlist specific for it
peterpumkineaterr
peterpumkineaterrOP2mo ago
Okay, i’ll post update here
ἔρως
ἔρως2mo ago
alright, and good luck
Want results from more Discord servers?
Add your server