WEBVTT

0
00:00.720 --> 00:01.350
Hey guys,

1
00:01.350 --> 00:05.730
welcome to Day 46 of 100 Days of Code. Today

2
00:05.730 --> 00:08.310
we've got a pretty special project for you.

3
00:08.880 --> 00:13.380
It's a musical time machine project. So what does that mean?

4
00:14.040 --> 00:14.520
Well,

5
00:14.520 --> 00:19.520
recently I received a mixed tape from a friend and the mix tape contained all of

6
00:21.750 --> 00:25.950
the top songs from the period of time when we went to school together.

7
00:26.400 --> 00:28.230
And it was a really, really beautiful gift

8
00:28.230 --> 00:33.000
and it was a really nice way of jogging your memories for that particular time

9
00:33.000 --> 00:35.820
point in your life. This got me thinking,

10
00:35.880 --> 00:40.880
and I thought about how music can take you back into a particular time in your

11
00:41.580 --> 00:46.580
life as if it just transported you. By listening to the same songs that were hits

12
00:48.300 --> 00:49.770
during that period of time

13
00:50.100 --> 00:55.100
it was like as if I was being transported back and could relive a moment in my

14
00:56.340 --> 00:59.910
childhood. And you might have the same experience.

15
01:00.120 --> 01:04.470
Maybe there's certain songs that were really popular in your childhood that

16
01:04.470 --> 01:08.880
brings back memories, or maybe for a particular relationship,

17
01:08.940 --> 01:13.940
or maybe a holiday that you went on. Trying to jog these memories by using music

18
01:15.810 --> 01:16.470
is a really,

19
01:16.470 --> 01:21.470
really fantastic way of reminiscing and savoring some of your favorite moments

20
01:21.540 --> 01:22.373
in time.

21
01:22.740 --> 01:27.420
So what we're going to be building today is a Python time machine,

22
01:28.050 --> 01:32.100
not the sort of time machine that might take a human back in time,

23
01:32.340 --> 01:37.340
but it will go back in time to find the music that was in the top 100 shots that

24
01:39.120 --> 01:44.120
was being played all over the radio so that you can relive that period of time

25
01:44.550 --> 01:47.760
once more through music. Billboard

26
01:47.790 --> 01:51.480
compiles a list of the top 100 songs.

27
01:51.480 --> 01:55.650
So these are the most played songs during a particular week.

28
01:56.160 --> 02:01.110
And if you go to chart/hot-100, you'll see it for the current week,

29
02:01.560 --> 02:06.560
but there's also a feature where you can change the date to any data in the past

30
02:06.960 --> 02:07.793
20 years.

31
02:08.280 --> 02:12.180
So if we select a random date in year 2000,

32
02:12.540 --> 02:17.280
you can see that the songs that come up here, and it depends on your age

33
02:17.310 --> 02:18.360
but some of these artists

34
02:18.360 --> 02:23.360
you might have never heard of like N Sync or Destiny's child or Vertical

35
02:23.790 --> 02:28.020
Horizon. But if you listen to these tracks in order,

36
02:28.260 --> 02:33.260
then it will be almost like you've been transported back to year 2000,

37
02:33.420 --> 02:37.380
August 12 and you're just listening to the things on the radio.

38
02:38.190 --> 02:42.020
This is how we are going to approach this task. First,

39
02:42.050 --> 02:47.050
we're going to use Beautiful Soup to scrape the top 100 songs from a particular

40
02:48.470 --> 02:49.640
date of your choice.

41
02:50.360 --> 02:54.950
And then we're going to extract all of the song titles from the list,

42
02:55.430 --> 03:00.430
and then we're going to use the Spotify API to create a playlist for that

43
03:00.670 --> 03:01.503
particular date.

44
03:02.310 --> 03:07.290
And we're going to see right through Spotify for each of the songs and add

45
03:07.290 --> 03:12.150
those songs to our new playlist. So that by the end of this whole process,

46
03:12.390 --> 03:17.390
we end up with a playlist that has the top 100 songs for a particular date in

47
03:19.440 --> 03:20.273
the past.

48
03:20.610 --> 03:24.510
So if you've got an anniversary coming up or a birthday coming up,

49
03:24.720 --> 03:29.720
this might just be the perfect present where you create a playlist of the

50
03:30.090 --> 03:35.090
top of that 100 songs that was playing on the day that you met your wife or your

51
03:35.160 --> 03:40.020
husband, or maybe when you started a friendship or started a new job,

52
03:40.440 --> 03:45.440
and you can send them this playlist as your gift to jog their memories and

53
03:46.200 --> 03:48.660
remind them of that day in the past.

54
03:49.710 --> 03:51.630
So are you ready to build the time machine?

55
03:52.080 --> 03:55.860
If you are, head over to the next lesson while you will find step by step

56
03:55.860 --> 03:58.800
instructions and a lot of challenges

57
03:59.280 --> 04:03.630
that's going to get you to use all the skills you learned about how do you use 

58
04:03.630 --> 04:04.463
Beautiful Soup

59
04:04.740 --> 04:09.150
as well as the Spotify API in order to complete this project.

60
04:09.510 --> 04:10.500
So head over there now.