text
stringlengths
1
81
start
float64
0
10.1k
duration
float64
0
24.9
json or write it as well and it's a
3,423.119
4.401
completely text based format which means
3,425.44
4.72
that if i visit that url with my browser
3,427.52
4.4
what gets downloaded is just a bunch of
3,430.16
4.24
text but that text is formatted in a
3,431.92
5.04
standard way using curly braces and
3,434.4
5.12
square brackets using quotes and some
3,436.96
4.879
colons that ultimately contains all of
3,439.52
4.72
the information in apple's database on
3,441.839
4.48
weezer's song at least the first one
3,444.24
4.16
because i limited it to one in their
3,446.319
3.921
database and that's an api an
3,448.4
3.439
application programming interface a
3,450.24
4.319
mechanism whereby i can access data on
3,451.839
4.48
someone else's server and somehow
3,454.559
3.841
integrate it into my own
3,456.319
4.641
program now of course my browser chrome
3,458.4
4
is not something i wrote i should
3,460.96
3.2
actually write some python code that
3,462.4
4.24
perhaps pretends to be a browser to grab
3,464.16
4.8
the same data so let's do that let me go
3,466.64
3.919
back to vs code here and let me write a
3,468.96
4.72
program with code itunes.pi and we're
3,470.559
5.04
going to write some code by which i can
3,473.68
3.439
then use
3,475.599
4.881
the itunes api and in turn python to get
3,477.119
5.761
information about any band that i might
3,480.48
4.319
want i'm going to go here and import
3,482.88
4.64
first the requests library which i
3,484.799
4.721
installed earlier in order to make those
3,487.52
4.64
http requests i'm going to go ahead and
3,489.52
4.88
import the sys library by which i'll
3,492.16
4
have the ability to use command line
3,494.4
4.08
arguments like specification of the band
3,496.16
4.399
that i want to search for if not weezer
3,498.48
3.839
and then down here i'm going to go ahead
3,500.559
5.121
and insert some error checking to say if
3,502.319
5.921
the length of sys.rgv
3,505.68
5.6
does not equal 2 so if the user does not
3,508.24
4.48
provide me with the name of the file
3,511.28
3.92
they want to run and the name of a band
3,512.72
4.399
and that's it you know what let's just
3,515.2
4.32
go ahead and exit for now i could
3,517.119
4.081
provide a more explanatory message but
3,519.52
2.96
for now i'm going to keep things simple
3,521.2
3.76
and just exit the program prematurely so
3,522.48
5.359
that i can trust hereafter that sys.rt
3,524.96
4.32
has what i want
3,527.839
4
and now i have the opportunity to use
3,529.28
4.72
the requests library to write some
3,531.839
3.921
python code that effectively is
3,534
4.64
pretending to be a web browser so as to
3,535.76
5.92
connect to that same https url on
3,538.64
5.439
apple's own server so now that i've
3,541.68
4.08
guaranteed that the user has typed in
3,544.079
3.921
not just the name of the file but also
3,545.76
4.4
the name of a band at the prompt giving
3,548
4.96
me a length of 2 for sys.rgv let's go
3,550.16
5.439
ahead and execute requests.get which is
3,552.96
5.04
a function inside of the request package
3,555.599
4.321
that will literally get some response
3,558
4.079
from a server and the url that i want to
3,559.92
4.879
get is exactly the same as before https
3,562.079
4.081
colon slash
3,564.799
3.361
itunes.apple.com
3,566.16
5.04
search question mark entity equal song
3,568.16
6
ampersand limit equals one ampersand
3,571.2
5.68
term equals previously weezer but let's
3,574.16
4.639
make this program a little interactive
3,576.88
4.479
and actually allow the human to specify
3,578.799
4.481
at the command line what artists they'd
3,581.359
3.681
like to search for so i'm going to go
3,583.28
4.4
ahead and close my quote early and just
3,585.04
5.279
append using the concatenation operator
3,587.68
5.52
as in the past sis.rgv
3,590.319
5.52
bracket 1. and now it'd actually be nice
3,593.2
4.8
to store the response from the server in
3,595.839
3.601
a variable so i'm going to go ahead and
3,598
4.799
say response equals and to store all of
3,599.44
4.56
the response that comes back from the
3,602.799
3.201
server in a variable called response
3,604
3.76
down here now i'd like to just
3,606
3.44
understand what the server is returning
3,607.76
3.76
to me to make sure i know how next to
3,609.44
3.84
proceed so this isn't going to be very
3,611.52
3.039
pretty yet but i'm going to go ahead and
3,613.28
2.519
print out
3,614.559
4
response.json which ensures that the
3,615.799
4.841
data i'm getting back is formatted on my
3,618.559
4.721
screen as exactly that json the same
3,620.64
5.36
text format as we saw on my screen it's
3,623.28
4.799
not a useful program yet i'm really just
3,626
3.92
learning along the way but let me go
3,628.079
3.361
ahead now and increase the size of my
3,629.92
4.12
terminal window and run python of
3,631.44
5.04
itunes.pi and type in the name of a band
3,634.04
4.759
like weezer and hit enter
3,636.48
4.48
and what we see on the screen formatted
3,638.799
4.56
almost the same as before is exactly
3,640.96
4.879
that same text but what you'll see here
3,643.359
4.72