摘要: import pymysql #导入pymysql模块 con = pymysql.connect(host = '127.0.0.1',port = 3306 ,user = 'root',passwd = '111111' ,db = 'class_nu',charset='utf8') #固定格式 cursor = con.cursor(... 阅读全文
posted @ 2018-05-01 18:26 滕虎 阅读(177) 评论(0) 推荐(0)
摘要: http://www.cnblogs.com/wupeiqi/articles/5713315.html http://www.cnblogs.com/wupeiqi/articles/5713323.html http://www.cnblogs.com/wupeiqi/articles/5729 阅读全文
posted @ 2018-04-28 16:46 滕虎 阅读(166) 评论(0) 推荐(0)
摘要: (django1) C:\Users\Administrator>pip install django==1.9.8 ##进入虚拟环境后 安装 运行 jango 的 命令 manage.py@djangotest > startapp message # 创建 app 创建 一个 静态文件 stat 阅读全文
posted @ 2018-04-20 12:48 滕虎 阅读(96) 评论(0) 推荐(0)
摘要: 结果 F:\python_oldboy\Scripts\p\Scripts\python.exe F:/python_oldboy/geve/爬虫练习.pyGet https://www.python.org/ Get https://www.yahoo.com/ Get https://githu 阅读全文
posted @ 2018-04-15 17:46 滕虎 阅读(147) 评论(0) 推荐(0)
摘要: 图片下载 需要安装 (py3scrapy) C:\Users\Administrator.AK9VHAA9RRQ5EBC\Ten\Scripts>pip install pillow 链接 数据库 需要 安装 (py3scrapy) C:\Users\Administrator.AK9VHAA9RR 阅读全文
posted @ 2018-04-15 14:02 滕虎 阅读(105) 评论(0) 推荐(0)
摘要: 1 def parse(self, response): 2 aa = response.css('#archive.floated-thumb.post-thumb a::attr(href)').extract() 3 for i in aa: 4 print(i) 5 #res_select = re... 阅读全文
posted @ 2018-04-15 05:42 滕虎 阅读(112) 评论(0) 推荐(0)
摘要: import re #name = 'tooooooootwettenghu' #name = 'tenghu' #name = '187222222220' #name = '你sss好' #name = '你_好' #name = 'staudy in 美国 休斯顿大学' name = 'xxx生出2002年10月3号' #name_1 = '^t.*u$' #name_1 = '.*?(t... 阅读全文
posted @ 2018-04-08 17:07 滕虎 阅读(126) 评论(0) 推荐(0)
摘要: windows环境 安装 pip install virtualenv 安装指定版本的python(适用于多个版本的python) C:\Users\Administrator>virtualenv -p C:\Users\Administrator\AppData\Local\Programs\P 阅读全文
posted @ 2018-04-07 15:19 滕虎 阅读(137) 评论(0) 推荐(0)
摘要: socket server socket clinet 阅读全文
posted @ 2018-03-31 15:11 滕虎 阅读(130) 评论(0) 推荐(0)
摘要: class Animal(object): def __init__(self,name): self.name =nameclass Cat(Animal): def tall(self): print('miao miao')class Dog(Animal): def tall(self): 阅读全文
posted @ 2018-03-22 09:54 滕虎 阅读(113) 评论(0) 推荐(0)