 Hey, what's going on guys? My name is John Hammond and welcome back to the Python programming tutorial and this one around We're taking a look at proxies. We're finally be able to set those up really really simply and really really easily so it's taken as a keyword argument in our URL open function and That's all so let's go find ourself a proxy. Let's go to Google Let's just look up proxies It don't matter and hey free proxy list. There they go proxy list hide my ass calm perfect Let's just scroll down and see one that is close by us Looks like this one from China is not that bad. It's got an IP address. It's got a port here So we want both of these information And we'll hop on over to idle import your lib You and let's actually create a variable for proxy and that's actually going to be a dictionary So this takes this schema that's going for which is always in this case HTTP And that's all it needs to be that's just gonna be our key and then we need actually The proxy itself so it's IP address and then specify its port with a colon and the port afterwards. So Where'd it go? Where the heck'd you go? You update that quickly? Holy crap Okay. No, there you are Let's just take you Okay, so now I've got that variable set up and if we actually run before we use the proxy. Let's actually check out Something so we can see our IP address before and just so you guys believe me. Let's go to httbin.org And forward slash proxy. Sorry for slash IP. We'll get us our IP. We just read this Okay, so that's my current IP address now. We want to know what it is after we supply a proxy You guys know that we can supply proxies as an argument in our URL open function So let's throw that in there We're gonna use it as a specific keyword argument because there are other things we could throw in this in this function So let's specify it with our proxies and then we'll use that proxy variable that we just created Now when we run this Takes a little bit because we're going through all of that networking to go through their their proxy and boom there It is really really simple now We're coming from their IP address rather than ours all we had to do is specify that we're using HTTP The proxy that we're gonna use its IP address and the port that we're going through super simple right super super easy We can build this into our own URL URL opener object with the if we create our own class if we subclass the thing and we use up the Super function to call the constructor with this proxy because there's no variable for it in The objects in the in the class kind of blueprint But we can do that with the super function if you guys need help setting that up and you're curious about it You can just say the word I'm not gonna go through and demonstrate it because I think this is simple enough and pretty easy to learn And follow through so cool. Hope you guys enjoyed it Hope you guys liked it and trust me we're using that proxy right now with everything we open up when specify We're gonna use that process that proxy. Thanks for watching everybody. See you in the next tutorial