这篇文章主要分享一个python网页请求模块urllib2模块的简单封装代码. 原文转自:http://www.jbxue.com/article/16585.html 对python网页请求模块urllib2进行简单的封装.例子: #!/usr/bin/python #coding: utf-8 import base64 import urllib import urllib2 import time class SendRequest: ''' This class use to set…
Name urllib2 - An extensible library for opening URLs using a variety of protocols 1. Description The simplest way to use this module is to call the urlopen function,which accepts a string containing a URL or a Request object . It opens the URL and r…