This recipe shows how we can easily read entire web pages by using some of Python's built-in modules. We will display the web page data first in its raw format and then decode it, and then we will display it in our GUI.
Using urlopen to read data from websites
Getting ready
We will read the data from a web page and then display it in the ScrolledText widget of our GUI.
How to do it...
First, we create a new Python module and name it URL.py. We then import the required functionality to read web pages using Python. We can do this in very few lines of code:
- Create a...