資源簡介
python3.4爬取網絡圖片,然后寫入文件的示例小程序
代碼片段和文件信息
#!?/usr/bin/python
#?-*-?coding:?utf-8?-*-
import?urllib.requesturllib.error
try:
#抓取網絡資源
resp=urllib.request.urlopen(‘http://su.bdimg.com/static/superplus/img/logo_white_ee663702.png‘)
html=resp.read()
- 上一篇:python實現可視域算法
- 下一篇:python實現VRPTW求解禁忌搜索算法
評論
共有 條評論