1 00:00:05,070 --> 00:00:08,720 Getting images from euro hello, everyone. 2 00:00:08,730 --> 00:00:13,950 Today I'm going to show you how you can actually extract images from a euro, which is quite funny. 3 00:00:14,490 --> 00:00:17,160 So the key here is to use two modules. 4 00:00:17,460 --> 00:00:25,120 One of them is called the R e module, while the other one is called the AMG module. 5 00:00:25,260 --> 00:00:31,260 OK, so using these two modules will actually enable you to extract pictures from Python. 6 00:00:31,710 --> 00:00:38,030 Now let's go here to the idea and create a new file, because this is going to be a Runnable file. 7 00:00:38,040 --> 00:00:43,420 So Python file and I will write writer's name of the file image. 8 00:00:45,900 --> 00:00:51,510 OK, so here we're going to write the code for extracting images and let's start writing. 9 00:00:52,260 --> 00:00:56,100 So let's first say the Python folder by USA. 10 00:00:58,150 --> 00:01:07,810 Been EMV, OK, and then Python three, and now let's write from U. 11 00:01:07,810 --> 00:01:16,240 RL Library DOT request, and here we're going to report to you are ale open? 12 00:01:16,630 --> 00:01:21,280 And also I'm going to upload the u r l. 13 00:01:23,730 --> 00:01:24,300 Joint. 14 00:01:26,300 --> 00:01:30,500 OK, now let's also import. 15 00:01:32,720 --> 00:01:34,710 The E packaged. 16 00:01:35,150 --> 00:01:42,410 OK, so let's create a function in the function or the code, don't vote. 17 00:01:45,130 --> 00:01:56,410 Underscore page, and here will pass, you are OK with who you are, and we're going to do the page 18 00:01:56,410 --> 00:01:57,870 that is related to this. 19 00:01:57,880 --> 00:01:58,300 You are. 20 00:01:59,060 --> 00:02:01,180 So let's write the return. 21 00:02:03,130 --> 00:02:04,570 You are Al. 22 00:02:06,580 --> 00:02:07,220 All fun. 23 00:02:07,410 --> 00:02:13,360 OK, so first we're going to open the euro and I'm going to pass here the euro, OK, and then let's 24 00:02:13,360 --> 00:02:14,890 try to dot read. 25 00:02:15,220 --> 00:02:26,390 So we're going to read the euro, the euro, then decode the code, OK, and difficult with you, T.F. 26 00:02:26,570 --> 00:02:27,560 Dash eight. 27 00:02:28,300 --> 00:02:30,930 So we're done with this function and let's create another one. 28 00:02:31,180 --> 00:02:33,700 So --. 29 00:02:35,320 --> 00:02:37,720 Underscore, image. 30 00:02:38,290 --> 00:02:39,220 Underscore. 31 00:02:41,580 --> 00:02:42,480 Locations. 32 00:02:43,080 --> 00:02:43,570 OK. 33 00:02:43,980 --> 00:02:51,270 And here are right Page, so here we are going to pass the page from that girl and I write I M.G.. 34 00:02:52,960 --> 00:02:53,890 Underscore. 35 00:02:56,510 --> 00:03:02,000 Regex equals r e dot. 36 00:03:03,760 --> 00:03:08,110 Complete and then this frightening sight. 37 00:03:10,320 --> 00:03:16,860 I am seeing them actually get a bit closer, so here right am. 38 00:03:20,000 --> 00:03:35,190 Semicolon plus SIRC equals, and then they'll put the following comma, I repeat, not ignorance. 39 00:03:35,240 --> 00:03:40,040 OK, so we're going to ignore the symbols and that's it here. 40 00:03:40,520 --> 00:03:42,650 Then let's write a return. 41 00:03:44,280 --> 00:03:52,860 AMG rejects don't find all OK, and they were right here, page. 42 00:03:53,170 --> 00:03:54,860 OK, that's it. 43 00:03:56,220 --> 00:03:57,660 And then that's right, if. 44 00:03:59,820 --> 00:04:00,450 Name. 45 00:04:03,010 --> 00:04:03,910 Equals. 46 00:04:06,510 --> 00:04:11,050 Maine, OK, and let me right then, of course, here. 47 00:04:11,820 --> 00:04:17,330 So if name equals Maine and here, we're actually going to run the function. 48 00:04:17,610 --> 00:04:27,780 So our right targets underscore Eurail will be equal to HTP. 49 00:04:31,220 --> 00:04:33,050 YouTube dot com. 50 00:04:34,940 --> 00:04:40,580 And then site will be equal to. 51 00:04:42,810 --> 00:04:48,280 Donald Page and hear output target euro. 52 00:04:48,420 --> 00:04:52,890 OK, so as you can see, we call here The Donald. 53 00:04:55,210 --> 00:04:56,350 Page function. 54 00:04:56,530 --> 00:05:07,390 OK, so now from now on, we have the page downloaded in our let's right image, location will be equal. 55 00:05:07,420 --> 00:05:13,720 Actually misallocations will be equal to extract image. 56 00:05:15,050 --> 00:05:16,060 Locations. 57 00:05:16,460 --> 00:05:25,400 OK, so this is a function that we also created and the page will be called YouTube. 58 00:05:27,310 --> 00:05:32,860 OK, so let's try it now for SIRC. 59 00:05:34,520 --> 00:05:39,230 In image locations. 60 00:05:42,080 --> 00:05:42,730 OK. 61 00:05:44,970 --> 00:05:48,750 I would like to print you are now. 62 00:05:50,420 --> 00:05:50,880 Join. 63 00:05:51,700 --> 00:05:53,680 OK, and then our right here. 64 00:05:55,230 --> 00:06:04,910 Target was Target, Eurail, slash is Arcy, but it. 65 00:06:06,390 --> 00:06:10,380 OK, let's run our coat and see what happens, basically. 66 00:06:10,980 --> 00:06:14,210 So here is a terminal and let's try it. 67 00:06:16,260 --> 00:06:19,890 Python, and then you should not be white. 68 00:06:21,300 --> 00:06:29,120 OK, so here we conceived out of the name mutual is not defined or we don't have it all. 69 00:06:29,130 --> 00:06:35,520 And this is because here instead of you to forget the right side, OK, so that should be fine now. 70 00:06:36,150 --> 00:06:37,940 And let's try it once again. 71 00:06:40,550 --> 00:06:48,920 So the cold front properly, as you can see, but it didn't find any pictures on YouTube, so this might 72 00:06:48,920 --> 00:06:55,910 be because YouTube encrypts the images there in some way or there are simply no images and everything. 73 00:06:55,910 --> 00:06:57,340 So data just from the users. 74 00:06:57,590 --> 00:07:06,550 So actually, I'm going to put here on my website, which is called Skilled Army, OK, Skilled Army. 75 00:07:06,950 --> 00:07:10,130 And I know that they have images on it. 76 00:07:10,460 --> 00:07:15,430 So let's run the quote once again, see if I'm going to get some images. 77 00:07:16,220 --> 00:07:22,340 So now it's loading and you can see that there are plenty of images here and let's actually check some 78 00:07:22,340 --> 00:07:22,710 of them. 79 00:07:22,970 --> 00:07:28,010 OK, so I'm going to copy the link and I'm going to go and post in the browser. 80 00:07:28,550 --> 00:07:31,310 OK, so here is the browser and. 81 00:07:33,640 --> 00:07:38,000 And I will and I will base the link here. 82 00:07:38,580 --> 00:07:46,200 OK, so you can see that this is an image from my website that you can see, which means that everything 83 00:07:46,210 --> 00:07:47,080 works correctly. 84 00:07:47,080 --> 00:07:56,220 And actually the images from my website are really imported or exported into the terminal where we can 85 00:07:56,230 --> 00:08:02,470 show them this is a very convenient way for you to check basically everything that is being uploaded 86 00:08:02,470 --> 00:08:03,960 to a website or the images. 87 00:08:04,570 --> 00:08:06,350 So that's everything for today, guys. 88 00:08:06,370 --> 00:08:12,700 I think we learned quite a lot specifically how to get images over a network using Python. 89 00:08:13,030 --> 00:08:14,440 Thank you very much for watching. 90 00:08:14,440 --> 00:08:16,650 And I will see you in the next video.