2019年7月21日
摘要:
转:https://www.cnblogs.com/beiluowuzheng/p/9738159.html 服务器中的数据库 Redis服务器将所有数据库都保存在服务器状态redis.h/redisServer结构体的db数组中,db数组的每个项都是一个redis.h/redisDb结构体,每个r
阅读全文
posted @ 2019-07-21 11:15
KD_131
阅读(636)
推荐(0)
2019年7月19日
摘要:
import random # 对插入的数据 去重 lst = [] for k in range(20): i = random.randint(1,10) print(i) if i not in lst: lst.append(i) print(lst)
阅读全文
posted @ 2019-07-19 17:10
KD_131
阅读(295)
推荐(0)
2019年7月16日
摘要:
# selenium from selenium import webdriver import time driver_path = r"G:\Crawler and Data\chromedriver.exe" driver = webdriver.Chrome(executable_path=driver_path) driver.get('https://www.baidu.com/...
阅读全文
posted @ 2019-07-16 07:19
KD_131
阅读(7630)
推荐(0)
摘要:
# 有问题 from selenium import webdriver import time from lxml import etree class LagouSpider(object): driver_path = r"G:\Crawler and Data\chromedriver.exe" def __init__(self): self....
阅读全文
posted @ 2019-07-16 07:13
KD_131
阅读(447)
推荐(0)
2019年7月15日
摘要:
在介绍WebDriverWait之前,先说一下,在selenium中的两种等待页面加载的方式,第一种是隐式等待,在webdriver里面提供的implicitly_wait()方法,driver.implicitly_wait(30) #单位:秒第二种是显示等待,是在support/wait中的We
阅读全文
posted @ 2019-07-15 15:53
KD_131
阅读(389)
推荐(0)
2019年7月12日
摘要:
requests.exceptions.SSLError: HTTPSConnectionPool(host='www.baidu.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, u'
阅读全文
posted @ 2019-07-12 18:55
KD_131
阅读(5227)
推荐(1)
2019年7月8日
摘要:
转: https://www.cnblogs.com/qlqwjy/p/8270011.html 今天一个同学问我mysql去除重复数据,自己做了个测试顺便记录下: 查看表结构: mysql> desc testdelete; + + + + + + + | Field | Type | Null
阅读全文
posted @ 2019-07-08 15:19
KD_131
阅读(769)
推荐(0)
摘要:
# 查询所有重复的数据 SELECT * FROM hao123 WHERE ir_url IN (SELECT ir_url FROM `hao123` GROUP BY ir_url having count(ir_url)>1) # 只显示某几个字段 提高查询速度SELECT ir_title,ir_url FROM hao123 WHERE ir_url IN(SELECT ir_ur...
阅读全文
posted @ 2019-07-08 15:06
KD_131
阅读(2270)
推荐(0)
2019年7月7日
摘要:
python生成随机数、随机字符串 import randomimport string # 随机整数:print random.randint(1,50) # 随机选取0到100间的偶数:print random.randrange(0, 101, 2) # 随机浮点数:print random.
阅读全文
posted @ 2019-07-07 20:52
KD_131
阅读(613)
推荐(0)
摘要:
表的操作 1.创建表 实例: 2.查询表的数据和结构 3.复制表 4.删除表 drop table 表名;
阅读全文
posted @ 2019-07-07 20:19
KD_131
阅读(218)
推荐(0)