python
ccwall3
这个作者很懒,什么都没留下…
展开
-
普通python模拟登陆
#!/usr/bin/python import HTMLParser import urlparse import urllib import urllib2 import cookielib import string import re #登录的主页面 hosturl = 'http://www.douban.com'转载 2014-07-08 15:27:26 · 330 阅读 · 0 评论 -
python实现简单爬虫功能
#coding=utf-8 import urllib import re def getHtml(url): page = urllib.urlopen(url) html = page.read() return html def getImg(html): reg = r'src="(.+?\.jpg)" pic_ext' imgre = re.c转载 2015-03-01 11:17:41 · 238 阅读 · 0 评论 -
python操作MySQL数据库
python操作MySQL数据库 2012-05-29 17:41 by Rollen Holt, 114552 阅读, 19 评论, 收藏, 编辑 坚持每天学一点,每天积累一点点,作为自己每天的业余收获,这个文章是我在吃饭的期间写的,利用自己零散的时间学了一下python操作MYSQL,所以整理一下。 我采用的是MySQLdb操作的MYSQL数据库。先来一个简单的例子吧:转载 2015-03-10 22:57:45 · 250 阅读 · 0 评论