Extracting HTML Documents from Web Pages Using Python 05/05/11
Extracting HTML Documents from Web Pages Using Python: Question: Can you extract HTML documents from live web pages without even using an internet browser? Answer: Yes you can. All you need is a Python interpreter and these shortcommands: >>> ...
Extracting HTML Documents from Web Pages Using Python:
Question: Can you extract HTML documents from live web pages without even using an internet browser?
Answer: Yes you can. All you need is a Python interpreter and these shortcommands:
>>> import urllib
>>> sock = urllib.urlopen(“PAGE URL”)
>>> htmlSource = sock.read()
>>> sock.close()
>>> print htmlSource
Illustration (click to enlarge):
Related posts:
You can leave a response, or trackback from your own site.

































































Leave A Reply