首页 软件开发 代码片段 python ( Page 11 )

python 1073

#Python
python爬虫下载百度贴吧图片

本次爬取的贴吧是百度的美女吧,给广大男同胞们一些激励 在爬取之前需要在浏览器先登录百度贴吧的帐号,各位也可以在代码中使用post提交或者加入cookie   爬行地址:h…

2015-11-12 559

#Python
python发送各类邮件的主要方法

    python中email模块使得处理邮件变得比较简单,今天着重学习了一下发送邮件的具体做法,这里写写自己的的心得,也请高手给些指点。 &nbs…

2015-11-12 176

#Python
Python3.4实现的12306最新验证码识别

import ssl import json from PIL import Image import urllib import re import urllib.request…

2015-11-12 725

#Python
python从网络端口读取文本数据

# To test it with netcat, start the script and execute: # # echo "Hello, cat." |…

2015-11-12 731

#Python
Python3.4 验证码识别

from PIL import Image, ImageEnhance Mods = [] for i in range(10): Mods.append((str(i), Ima…

2015-11-12 470

#Python
python爬取千万淘宝商品的脚本

分享之前爬虫爬到的1000万条淘宝商品信息。平衡涵盖各种分类,包括商品名、卖家id、地区、价格等信息,json格式。 import time import leveldb from…

2015-11-12 167

#Python
遗传算法的神经网络python实现代码

遗传算法的神经网络python实现代码 ## {{{ http://code.activestate.com/recipes/578241/ (r1) from operator …

2015-11-12 932

#Python
Python通过PIL获取图片的主要颜色并和颜色库进行对比的代码

这段代码主要用来从图片提取其主要颜色,类似Goolge和Baidu的图片搜索时可以指定按照颜色搜索,所以我们先需要将每张图片的主要颜色提取出来,然后将颜色划分到与其最接近的颜色段上…

2015-11-12 1,000

#Python
python 定时执行指定的函数

python 定时执行指定的函数 # time a function using time.time() and the a @ function decorator # test…

2015-11-12 703

#Python
12306 火车票监控Python代码

import urllib.request as request import http.cookiejar as cookiejar import re import os im…

2015-11-12 552

#Python
urllib2使用代理服务器

本代码演示了python的urllib2模块如何使用代理,以及需要登录验证的proxy # The proxy address and port: proxy_info = { '…

2015-11-12 967

#Python
python通过pil生成缩略图的简单代码

python通过pil生成缩略图的简单代码,这段代码会强行将图片大小修改成250×156 from PIL import Image img = Image.open('…

2015-11-12 938
1 9 10 11 12 13 90