- [Instructor] One of the areas where Python…really shines is in retrieving and working with…data from the internet, such as jayson, xml, and html.…In this chapter, we'll see how to work with all three.…So let's begin by going into the…chapter five folder and opening inetdata_start.…In this first example, we're going to…just retrieve data from a server and print the results.…So in order to make a request to a web server,…I need to import the url lib request module.…So I'll so that first.…
So this module provides the classes…and code I need to make http requests.…So now, let's define the main function.…And then I'll create a variable named web url.…And what I'm going to do is call the…url open function on the request class,…and that will give me back a response object.…And url open just takes a string, represents the url.…So I'll just go ahead and open up the Google home page.…And for the moment, I'm just going…to print out the result code.…
The result code is obtained by calling the get code…function on the web url response.…
- Installing Python
- Choosing an editor or IDE
- Working with variables and expressions
- Writing loops
- Using the date, time, and datetime classes
- Reading and writing files
- Fetching internet data
- Parsing and processing HTML
Skill Level Beginner
Programming Foundations: Design Patterns (2013)with Elisabeth Robson2h 19m Intermediate
1. Getting Started
2. Python Basics
3. Working with Dates and Time
4. Working with Files
5. Working with Web Data
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.