python
backgj0
这个作者很懒,什么都没留下…
展开
-
python 按字典value排序以及按list中字典的某个key的value排序
1. 按照字典value排序student_1={ 'a':2, 'b':4, 'c':6, 'd':8}student_1_sort = sorted(student_1.iteritems(), key=lambda d: d[1], reverse=True)print(student_1_sort)123456789输出:[('d', 8), ('c...原创 2018-06-04 15:05:32 · 522 阅读 · 0 评论 -
Pycharm 中Available packages nothing to show
国内源:清华:https://pypi.tuna.tsinghua.edu.cn/simple阿里云:http://mirrors.aliyun.com/pypi/simple/中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/华中理工大学:http://pypi.hustunique.com/山东理工大学:http://pypi.sdutlinux.o...原创 2018-06-14 15:30:23 · 22055 阅读 · 5 评论 -
'WebElement' object is not iterable报错
爬取斗鱼直播间信息报错 'WebElement' object is not iterabledef get_content_list(self): # 提取数据 li_list = self.driver.find_elements_by_xpath("//ul[@id='live-list-contentbox']/li") content_list = [] ...原创 2018-09-18 10:41:27 · 4259 阅读 · 0 评论