From the course: Python Standard Library Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Working with URLs

Working with URLs - Python Tutorial

From the course: Python Standard Library Essential Training

Start my 1-month free trial

Working with URLs

- [Instructor] Python provides great support for working with internet-based data, and in this chapter, we're going to look at some of the modules available for working with the internet. We're going to start off with URLs. The URL is one of the most basic building blocks of the internet, so, it's not surprising that you'll have to work with them when you're building apps that handle internet transactions. So, Python's urllib dot parse module, which you can learn more about at this link, make this process a bit easier by providing functions needed to work with the components of URLs. You can see here that these are all the URL handling modules, and we're going to start off by using some of the functions in the urllib parse module. So, let's jump over to our code, and let's open up URLs underscore start. So, I've imported the URL parse module at the top there, and I've also defined a sample URL that contains a scheme and it has a host name, a port, a path, and some query string…

Contents