使用Python访问并下载网页内容,python访问网页内容,[Python]代码#!
使用Python访问并下载网页内容,python访问网页内容,[Python]代码#!
[Python]代码
#!/usr/local/bin/python3.2import urllib.request,io,os,sysreq = urllib.request.Request("http://www.google.com")f = urllib.request.urlopen(req)s = f.read()s = s.decode('gbk','ignore')mdir = sys.path[0]+'/'file = open(mdir+'admin6.txt','a',1,'gbk')file.write(s)file.close()
相关内容
- 多线程下载百度图片大图,多线程百度图片大图,App.p
- 使用Python访问并下载网页内容,python访问网页内容,[P
- Iphone资源中PNG格式图片转化[转],,[Python]代码#-
- pyhooks实现键盘监控,pyhooks键盘监控,[Python]代码#
- hash加密小工具,hash加密工具,[Python]代码#!
- 子网掩码转换,东施效颦之作啊,东施效颦之作,子网掩
- 批量调整指定目录下图片宽高,指定目录图片,[Python]代
- 代码去开头数字,代码开头数字,[Python]代码t=
- python reportlab 生成中文PDF范例,pythonreportlab,df -h 命令内
- 实现移位密码(凯撒密码)加密算法(两种方法),凯
评论关闭