'Download the text only (and not the images) from a web page with urllib in Python

I'm parsing web pages for data using Python with urllib.request.Request('url here', headers). Unfortunately the file sizes seem very large and I believe the images etc are downloading in the text file when saving. Using urllib, is there a way to only request/download the text.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source