07 2021 档案
摘要:增 INSERT INTO [dbo].[user](x,y) VALUES(x,y) 删除 delete from [dbo].[all_ele] where fid=x 修改 UPDATE all_ele SET name=s,price=s,quantity=s WHERE fid=s 查 s
阅读全文
摘要:点击下载谷歌浏览器驱动 把解压的 浏览器驱动 chromderiver 放在python 解释器所在的文件夹 程序运行一下,看到下面的这个文件夹就是 原理:模拟人的一些操作,动态获取网页内容,所见即所得 打开网址: web=Chrome() web.get("https://www.lagou.co
阅读全文
摘要:原理:拿到网页源代码并且进行分析 关键词:etree .xpath a[@href="dapao"] a/@href text() import requests,csv from lxml import etree resp = requests.get(url) html=etree.HTML(
阅读全文
摘要:适用于:数据都在网页源代码上,可以直接从中提取到对应数据 例子:北京新发地网 原理:拿到页面源代码的文本,交给BeautifulSoup解析,然后找到对应的标签,获取值 关键词:BeautifulSoup find find_all get / mode='wb' .content resp = r
阅读全文
摘要:连接方案1: conn = pymssql.connect(host='127.0.0.1', port=1433, user='sa', password='password', database='b2c') cur = conn.cursor() cur.execute('SELECT * F
阅读全文