直接上代码,每行代码后面都有注释 import urllib.request import urllib import re import time import random import socket import threading import redis r = redis.Redis(host='192.168.60.112', port=6379,db=0,charset='utf-8')#换成自己的IP # 抓取代理IP ip_totle = [] for page in ran
1.下载xlwt的Python库 (This is a library for developers to use to generate spreadsheet files compatible with Microsoft Excel versions 95 to 2003.) 下载页面:xlwt 1.2.0 注:由于公司网络无法直接进行下载,需要这样办法. 2.安装 xlwt库 在Windows的命令行下,执行:python setup.py install
实现代码如下: #调用及测试webservice接口 import requests class SoapConnect: def get_soap(self,url,data): r = requests.post(url,data) print(r.text) if __name__ == '__main__': u = 'http://ws.webxml.com.cn/WebServices/MobileCodeWS.asmx/getMobileCodeInfo' d = {', 'use