[英]Fetch HTML From URL in Python
I am trying to read the HTML
contents of a URL
with Python
. 我正在尝试使用
Python
读取URL
的HTML
内容。 To fetch the HTML
contents of a URL
, would I use the module wget
, urllib
or a different module entirely? 要获取
URL
的HTML
内容,我是否完全使用模块wget
, urllib
或其他模块?
After Answers: I will use the urllib
module since that comes with the default Python 2.7 build, and I can't download external modules from this computer. 答案之后:我将使用
urllib
模块,因为它是默认的Python 2.7版本附带的,并且我无法从此计算机上下载外部模块。
List of Modules That Fetch URL Contents: 提取URL内容的模块列表:
Wget
Beautiful Soup
Urllib
Requests
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.