
Python
小口天,
这个作者很懒,什么都没留下…
展开
-
Python连接数据库
conn表示连接数据库,对数据的操作需要通过cursor来实现。 cursor用来执行命令的方法: callproc(self, procname, args):用来执行存储过程,接收的参数为存储过程名和参数列表,返回值为受影响的行数 execute(self, query, args):执行单条sql语句,接收的参数为sql语句本身和使用的参数列表,返回值为受影响的行数 executemany(...原创 2019-08-30 23:09:38 · 747 阅读 · 0 评论 -
Python爬虫----百度贴吧
URL分析 百度贴吧网页地址: 第1页:https://tieba.baidu.com/f?kw=lol&ie=utf-8&pn=0 第2页:https://tieba.baidu.com/f?kw=lol&ie=utf-8&pn=50 第3页:https://tieba.baidu.com/f?kw=lol&ie=utf-8&pn=100 根据ur...原创 2019-08-30 23:10:05 · 620 阅读 · 0 评论