Spotify playlist ID - spotify

Spotify uses a 22 character unique ID for each playlist. Does anyone know what the digits mean?
For example, I noticed that the first 7 characters of Spotify owned/curated playlists is 37i9dQZ
Then there seems to be some consistency across characters 8-9 (maybe to do with whether it is a personalised playlist?)

Related

How is a track's 30sec defined that's obtained from preview_url (Spotify Web API)?

I am interested to use an audio raw dataset provided by Spotify Web API in Python. I wonder if the audio sample follows any rules to define the 30sec provided by the preview_url.
preview_url | string | A link to a 30 second preview (MP3 format) of the track. Can be null
Is the 30sec of the track extracted from:
The first 30 sec?
The track after 1 minute?
The track between 1-3mins?
A random part of the track?
Spotify analyses every track and then is able to tell where different parts of the song begin and end.
I suppose that what you hear in the 30s preview is a guess that Spotify makes of what the refrain/main part of the songs is.
Therefore you can't generally say which part is chosen because that is determined by an AI for each song respectively.

Getting total number of streams and track release date through Spotify API

I'm trying to get a large list of songs released in year X, together with their number of plays/streams.
I've been using Spotify API, and I have a number of highly popular songs. Now, for my purposes, I also need a list of non-popular songs (low play counts). I am wondering if there is any strategy to get a list of songs (maybe last played ones?), and extract their release year and number of total plays?
I've been going through the API documentation and I can only find 'popularity', which seems different from total number of plays. Secondly, I haven't found a way to get a list of last played songs yet. Should I be considering another type of strategy?
I know that you can get a list of recently played songs of all users in certain user groups in last.fm. Perhaps there is something similar in Spotify API?
Unfortunately, there is no way to get play counts through the Spotify API, only the Popularity metric.

searching YouTube for videos with specific range of views eg. between 9,000,000 and 11,000,000

first time posting.
I wanted to ask if anyone knows how I can search on YouTube for, let's say, music video's that have been viewed between a set number of times. Like the title says for example, between 9 and 11 million times.
One reason I want to do this is because I want to find good music that I haven't heard before. The logic I'm working on is that the Got Talent type video's that get viewed millions of times are generally viewed that many times for one of two reason. 1) they're amazing. 2) they're embarrassingly horrible.
And though I don't think a song being popular will necessarily mean I'll like it, I'm hoping this method will be successful to some degree.
Another reason is to look for trailers for independent films with a similar logic as above. Though with these movies I think I only hear about them six months to a year after they've been released because they're flying under the radar.
If I were to be able to search for movie trailers with 'x' number of views though.. for example, between 500,000 and a million, maybe I'd be able to find movies that I'll like quicker than via time passing and them getting mentioned to me by a friend.
Any help would be greatly appreciated as I've wanted to be able to perform these kind of searches for awhile now.
thanks
You will need to use YouTube API v3.
I havent written this exact request but it looks like you can list videos then filter by 'Chart' = 'mostPopular'
https://developers.google.com/youtube/v3/docs/videos/list
Perhaps a bit of background reading on the API would help too...
https://developers.google.com/youtube/v3/
First off, you would need the Youtube Data API. "v3" means nothing because it's simply the current version, like "Windows 10."
The API lets you get a video's view count, but doesn't put it in a range like 9 million to 11 million.
Youtube's own search function is pretty sophisticated. For instance,
https://www.youtube.com/results?search_query=movie+trailer&search_sort=video_view_count&filters=month. This gives all results for "movie trailer," within the last month, sorted by view count. You can customize the URL, i.e. "week" instead of month would return only trailers from the last week. Or year, etc. Essentially this is a "Videos: List: MostPopular" query, with subject filter.
I have a few Youtube API scripts, and I hardly think it's worth the hassle to do it that way when Youtube's advanced search get you 99% there. If you did, you would need to to a Search:list query for a given subject (i.e. "movie trailer"). Limited to a given time frame (i.e. last month). Then for each video ID, make a Videos:list query to get its view count. Then print all, sorted by views.

Read list of artists, Add top songs to playlist using Spotipy

I am wanting to write a python program that reads a list of artists and creates a playlist with the top three songs from each artist. Is there a way to do this directly from the artist's name or would I have to create a list of artist IDs? If that is the case - I might as well make the playlist manually.
Thanks for your help!
How very timely. I literally just wrote a program that does almost exactly this today.
https://github.com/streadgold/FestivalPlaylistMaker
It reads in a list of artists (one per line) from lineup.txt and converts them to IDs and returns their top 5 tracks. Just change the limit from 5 to 3 and it sounds like it is exactly what you are asking for. Or at least a decent starting point.

J2ME Registration Screen

I would like to add some kind of Registration Screen to my J2ME software in order to allow users to use my app for a trial period and only give them full access after registration.
I know how to get the IMEI etc. but I wonder if there is already code out there which handles the generation of a unique phone identifier and creation of some kind of "CD-Key" for J2ME...
What a lot of downloadsites use(handango etc), is the RPN registration method.
Given a unique ID (IMEI on phones, ownerid on PocketPC, etc) you do a calculation on it which is unique for your app (for instance: add all letters together and divide by 5). This number is your unlock code.
now the user who wants to register your app, gives it's imei number to the webstore,... they pay,... and the webstore does your unique calculation. It then return the unlock code to the customer.
The customer inputs the unlock code into your app, if it matches then they payed!
The way to store this unique calculation is by virtue of RPN (Reverse Polish Notation). This is a way like how HP calculators worked. Instead of typic 4*3 and getting the answer 12, you type: 4 3 *
here is an article on the PocketPC implementation of how to implement the RPN method yourself. Lot's of webshops have the RPN calculator in their webbackend so this way you become compatible with them.

Resources