04 2017 档案

摘要:转自:http://www.cnblogs.com/yufeihlf/p/5717291.html 父子定位元素 查找有父亲元素的标签名为span,它的所有标签名叫input的子元素 find_element_by_css_selector("span>input") 标签名[属性=’属性值‘]:指 阅读全文
posted @ 2017-04-27 21:38 随便了888 阅读(211) 评论(0) 推荐(0)
摘要:1、distinct去除重复项,s,d别名,order by s.time desc以时间逆序排列 select distinct s.time,d.area from server.table s,device.table d where s.id = d.id and s.time > '201 阅读全文
posted @ 2017-04-25 23:03 随便了888 阅读(135) 评论(0) 推荐(0)
摘要:本人遇到的情况:dead kernel & try to restart failed 查看CMD发现这个库安装有问题 解决办法 1、pip uninstall backports.shutil_get_terminal_size 2、pip install --upgrade backports. 阅读全文
posted @ 2017-04-25 21:58 随便了888 阅读(1551) 评论(0) 推荐(0)
摘要:svgelementXpath = "//div[12]/*[name()='svg']/*[name()='g']/*[name()='g'][2]/*[name()='g'][1]/*[name()='image']" svgelem = driver.find_element_by_xpath 阅读全文
posted @ 2017-04-22 16:14 随便了888 阅读(3250) 评论(0) 推荐(0)
摘要:selenium等待特定元素加载完毕 is_disappeared = WebDriverWait(driver, 8, 0.5, ignored_exceptions=TimeoutException).until(lambda x: x.find_element_by_id("id").is_d 阅读全文
posted @ 2017-04-20 20:27 随便了888 阅读(15615) 评论(1) 推荐(1)
摘要:import pandas as pd import numpy as np df = pd.read_csv("result.csv") # csv # df = pd.read_excel("sample.xlsx") # excel df.to_excel("sample.xlsx", index=False) # write data... 阅读全文
posted @ 2017-04-20 16:40 随便了888 阅读(32341) 评论(0) 推荐(0)
摘要:import ctypes message = ctypes.windll.user32.MessageBoxA(0,'message','tips',0) 阅读全文
posted @ 2017-04-19 21:26 随便了888 阅读(3072) 评论(0) 推荐(0)
摘要:Python 判断是否存在Excel表,无则生成,有则删除重建 阅读全文
posted @ 2017-04-19 19:06 随便了888 阅读(14947) 评论(0) 推荐(0)
摘要:switch_source()用于获取文本信息rewrite_source()用于将信息顺序轮换,其参数times表示要轮换多少次,def switch_source(): tmp = [] with open('switch_source.txt','r') as ss: for i in ss: 阅读全文
posted @ 2017-04-17 08:30 随便了888 阅读(435) 评论(0) 推荐(0)
摘要:pip install pandas pip install openpyxl import pandas as pd class Excel(): def __init__(self): pass def get_index(self): datas = pd.read_excel('satisfaction.xlsx',sheetnam... 阅读全文
posted @ 2017-04-16 23:29 随便了888 阅读(268) 评论(0) 推荐(0)
摘要:1、类的访问限制:要让内部属性不被外部访问,可以把在属性的名称前加上两个下划线__,在Python中,实例的变量名如果以__开头,就变成了一个私有变量(private),只有内部可以访问,外部不能访问如std.__name访问报错。但可以通过std._Student__name访问 阅读全文
posted @ 2017-04-16 11:09 随便了888 阅读(1407) 评论(0) 推荐(0)
摘要:1、个人理解定义:在一个函数A内部定义一个函数B,并在定义的内部函数B内对这个函数A的变量进行引用,那么内部函数B就是闭包。 2、特性:在内部函数内不能对A函数的变量进行更改 (但是可以将其封装到一个容器内,如列表,再对其进行更改即可) 3、应用场景:函数上次运行结果作为此次函数参数调用 4、返回闭 阅读全文
posted @ 2017-04-09 22:07 随便了888 阅读(344) 评论(0) 推荐(0)
摘要:将列表val_list中包含的非法字符去掉,illegal_char是非法字符列表 阅读全文
posted @ 2017-04-08 23:33 随便了888 阅读(6076) 评论(3) 推荐(0)
摘要:从excel读取一行信息添加到一个临时列表,最后将所有行的列表添加到一个大列表。 源码: 阅读全文
posted @ 2017-04-07 18:21 随便了888 阅读(1903) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2017-04-06 23:21 随便了888 阅读(3) 评论(0) 推荐(0)
摘要:转自:http://www.cnblogs.com/2bjiujiu/p/6668932.html 阅读全文
posted @ 2017-04-05 23:48 随便了888 阅读(130) 评论(0) 推荐(0)
摘要:import os import multiprocessing 1、获取Chromedriver驱动动态路径 webdriver.Chrome(executable_path=os.path.join(os.getcwd(), "chromedriver.exe")) 2、等待特地(label)网页元素加载完毕,返回真 is_disappeared = WebDriverWait(dr, 3... 阅读全文
posted @ 2017-04-01 13:13 随便了888 阅读(1119) 评论(0) 推荐(0)