Getting images from euro hello, everyone.
Today I'm going to show you how you can actually extract images from a euro, which is quite funny.
So the key here is to use two modules.
One of them is called the R e module, while the other one is called the AMG module.
OK, so using these two modules will actually enable you to extract pictures from Python.
Now let's go here to the idea and create a new file, because this is going to be a Runnable file.
So Python file and I will write writer's name of the file image.
OK, so here we're going to write the code for extracting images and let's start writing.
So let's first say the Python folder by USA.
Been EMV, OK, and then Python three, and now let's write from U.
RL Library DOT request, and here we're going to report to you are ale open?
And also I'm going to upload the u r l.
Joint.
OK, now let's also import.
The E packaged.
OK, so let's create a function in the function or the code, don't vote.
Underscore page, and here will pass, you are OK with who you are, and we're going to do the page
that is related to this.
You are.
So let's write the return.
You are Al.
All fun.
OK, so first we're going to open the euro and I'm going to pass here the euro, OK, and then let's
try to dot read.
So we're going to read the euro, the euro, then decode the code, OK, and difficult with you, T.F.
Dash eight.
So we're done with this function and let's create another one.
So --.
Underscore, image.
Underscore.
Locations.
OK.
And here are right Page, so here we are going to pass the page from that girl and I write I M.G..
Underscore.
Regex equals r e dot.
Complete and then this frightening sight.
I am seeing them actually get a bit closer, so here right am.
Semicolon plus SIRC equals, and then they'll put the following comma, I repeat, not ignorance.
OK, so we're going to ignore the symbols and that's it here.
Then let's write a return.
AMG rejects don't find all OK, and they were right here, page.
OK, that's it.
And then that's right, if.
Name.
Equals.
Maine, OK, and let me right then, of course, here.
So if name equals Maine and here, we're actually going to run the function.
So our right targets underscore Eurail will be equal to HTP.
YouTube dot com.
And then site will be equal to.
Donald Page and hear output target euro.
OK, so as you can see, we call here The Donald.
Page function.
OK, so now from now on, we have the page downloaded in our let's right image, location will be equal.
Actually misallocations will be equal to extract image.
Locations.
OK, so this is a function that we also created and the page will be called YouTube.
OK, so let's try it now for SIRC.
In image locations.
OK.
I would like to print you are now.
Join.
OK, and then our right here.
Target was Target, Eurail, slash is Arcy, but it.
OK, let's run our coat and see what happens, basically.
So here is a terminal and let's try it.
Python, and then you should not be white.
OK, so here we conceived out of the name mutual is not defined or we don't have it all.
And this is because here instead of you to forget the right side, OK, so that should be fine now.
And let's try it once again.
So the cold front properly, as you can see, but it didn't find any pictures on YouTube, so this might
be because YouTube encrypts the images there in some way or there are simply no images and everything.
So data just from the users.
So actually, I'm going to put here on my website, which is called Skilled Army, OK, Skilled Army.
And I know that they have images on it.
So let's run the quote once again, see if I'm going to get some images.
So now it's loading and you can see that there are plenty of images here and let's actually check some
of them.
OK, so I'm going to copy the link and I'm going to go and post in the browser.
OK, so here is the browser and.
And I will and I will base the link here.
OK, so you can see that this is an image from my website that you can see, which means that everything
works correctly.
And actually the images from my website are really imported or exported into the terminal where we can
show them this is a very convenient way for you to check basically everything that is being uploaded
to a website or the images.
So that's everything for today, guys.
I think we learned quite a lot specifically how to get images over a network using Python.
Thank you very much for watching.
And I will see you in the next video.