5
Aside of nursing my child, Vitsy, and dabbling in the art of code golf, I also am an avid dubstep fan, listening to all the new dubstep that Monstercat puts out as regularly as I can. I also share a random dubstep of the day, though not regularly, in the Nineteenth Byte. This last bit is what this challenge relates to; so, without further ado, let me get to what you actually need to think about:
The Challenge
You must generate a randomly sorted list of songs from this playlist in the following format:
<Title> - <Artist>: <link to the video>
Rules
- The output list must update with the playlist provided, or every byte used counts as 2 (your score would be double your byte count).
- The output list must have no repeats.
- The output list must be given in the specified format.
- The output list must have all of the videos listed in the playlist provided.
- You may not use builtins for array shuffling (such as
Collections.shuffle(List<?> x)
from Java) - You may not use the YouTube builtin shuffle mechanism (as this is not random).
- There are no limits on runtime.
Example Output
Division - Ephixa: https://www.youtube.com/watch?v=M1mPFWhgYUM&list=PLF5C76212C58C464A&index=95
Wanna Know You (ft. Holly Drummond) - Direct: https://www.youtube.com/watch?v=6QWQfzYMJTs&list=PLF5C76212C58C464A&index=24
Edge of the World (feat. Becko) - Razihel & Xilent: https://www.youtube.com/watch?v=P0dQ55ZgNkw&index=4&list=PLF5C76212C58C464A
... until the final video ...
Way Too Deep - Grabbitz: https://www.youtube.com/watch?v=4T28WgVqdrA&index=8&list=PLF5C76212C58C464A
It may be worth perusing the YouTube API, but parsing the page with the playlist on it might save you some time.
If the solution does not update with the playlist, what format is it expected to receive it in? – user81655 – 2016-02-10T10:57:22.127
@user81655 There is no input whatsoever, in either case. The link for gathering the information is constant. Hardcoding the list of songs will double your byte count. – Addison Crump – 2016-02-10T11:05:31.787
Hey, +1 for Monstercat! – cat – 2016-04-09T20:15:20.230
What counts as a builtin for shuffling? – cat – 2016-04-09T20:47:05.850
Like, the PHP answer does something with
rand()
-- where's the line? – cat – 2016-04-09T20:47:32.7731@cat When a builtin relocates items in an array or list with a single call. – Addison Crump – 2016-04-09T22:00:00.147