swapagarwal / JARVIS-on-Messenger

:speech_balloon: A community-driven python bot that aims to be as simple as possible to serve humans with their everyday tasks
https://m.me/J.A.R.V.I.S.on.Messenger
MIT License
1.34k stars 991 forks source link

Music: Add YouTube link #258

Open swapagarwal opened 6 years ago

swapagarwal commented 6 years ago

Need to find a mapping from spotify track id to youtube id, if possible.

bmroach commented 6 years ago

Hi @swapagarwal , can I help out here?

horrormyth commented 6 years ago

@bmroach Lets do that

swapagarwal commented 6 years ago

@bmroach Sure, go ahead! 😄

azie-ginanjar commented 6 years ago

has anyone work on this issue?

maferland commented 6 years ago

What is the goal exactly here ? Feed a spotify track id and find the matching youtube id ?

akash612 commented 6 years ago

Hello @swapagarwal , can I take this one ?

thilak007 commented 6 years ago

Hi @swapagarwal , is this still open?

swapagarwal commented 6 years ago

This is more of an investigation task, hence I'm not assigning this task to a particular person. The code change will be minimalistic. Please share your findings in this thread. 😄

Jakod96 commented 6 years ago

After looking around there doesn't seem to be foolproof method to do it as a 1-1 mapping of the ID to the youtube link, but querrying the youtube API for "ARTIST - SONGNAME" gives very good results.

Krafty-Coder commented 6 years ago

Is this done?

casdidier commented 6 years ago

I am also interested in this topic is it done ?

swapagarwal commented 6 years ago

@Krafty-Coder @casdidier This is still open.

hrithik-jha commented 5 years ago

@swapagarwal This might help: https://github.com/dwickstrom/tuba

d4nielhdz commented 5 years ago

Hey! I'd like to work on this. In which file do I have to add this feature?

lovlin-thakkar commented 5 years ago

@swapagarwal Is this issue still open? If yes, can you assist me with this? Thanks.

jcconnol commented 5 years ago

Since this is not being assigned to anyone and appears to still be open I can work on this too if you don't mind. I think I would take Jakod96's advice and just query Youtube since Spotify and Youtube are not connected in any way.

romankarski commented 5 years ago

@swapagarwal hi, i need done some commit in python for my Python classes at Unicersity. Is it still open ? Do you think is it proper for beginners to do this commit ? Can You give some advice where to start ? I have founded music.py for spotify

C-H-Fahy commented 5 years ago

I'll give it a go as I could have found a way to do it, but does anybody know how I could find an artist name and song name from the spotify link

zsaeed2 commented 5 years ago

This is my first open source project. I was wondering what you guys needed done and how I could contribute to it

elkku26 commented 5 years ago

I'm new to git, but here's my idea. Could we try to get the spotify page with the id, scrape that page for the name of the song, and use the YT API to look up the name of the song on YouTube and get a link? I know this is very clunky but the first thing that came to mind. Thougts?

nuk380y commented 4 years ago

@elkku26 There are some Python libraries that would be good for that, but it might be easier to get access to the Spotify (spotipy) and YT (YouTube Data API Documentation) APIs as those will be in a more "machine readable" format. Song name probably won't be quite enough to ensure accurate results as songs are sometimes covered by other artists, or used as background music by various content creators on YT.

With all of that said, it seems that you're on the right track! If you can pull the artist name, and the song name from the Spotify API, then it's a matter of figuring out of how to translate that into an old-fashion "Google Hacks" style search query.

TL;DR: The search you would want to make would be something similar to "{{ artist_name }} - Topic" "{{ track_name }}".

YT started aggregating music videos and singles under a topic for the artist when YT was experimenting with YTMusic. Searching in the web interface for "{{ artist_name }} - Topic" (the quotations tell the search function to look for that specific string) would provide all of the songs, singles, promotional videos, and music videos that have been identified as the artist's intellectual property. Running a search for "{{ track_name }}" would provide videos that are titles as close to the specific track_name.

For example: If I were to search Spotify for the song used in the U.S. trailer for "Man on Fire" and find "The Mark Has Been Made" by Nine Inch Nails, I would then search YT with the query "Nine Inch Nails - Topic" "The Mark Has Been Made".

nuk380y commented 4 years ago

I would like to assist in this issue if at all possible. I'm very new to python, but hope at the very least to add some insight in to solving this.

elkku26 commented 4 years ago

Glad to see this project isn't entirely dead. I'll get home in a few hours and I'll try to get a basic prototype working. I'll update when I've made some progress.

elkku26 commented 4 years ago

I took a look at the API. It seems that it doesn't support unauthorised requests anymore, meaning you need to have the requests connected to a Spotify account. That makes it a bit harder I think but I'll try to get it working.

dkgitcode commented 4 years ago

I have some good experience with the Spotify API; if this is still open, I'm willing to help with this.

Rahul-3000 commented 3 years ago

hi @swapagarwal is the issue still open

desikan95 commented 3 years ago

Is this still open @swapagarwal ?

TheFenrisLycaon commented 3 years ago

Is this open ?

atharshah1 commented 3 years ago

is this open? if it is I would like to work on it

netra2201 commented 1 year ago

Is it open? then I would like to work on it

AK2k30 commented 11 months ago

is this still active?? If it is then i would like to contribute??

PranjalAsthana commented 9 months ago

Is this still open? If it is I would like to contribute.