![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python环境
文章平均质量分 55
pabla
这个作者很懒,什么都没留下…
展开
-
【无标题】
python爬虫(十六) -IndexError: list index out of range在用lxml和xpath对一个网站进行解析,在解析的时候出现错误-IndexError: list index out of range原因是在中这个网站的html代码中有的标识为空,只要加上try.....except 错误机制跳过空值就行了例如:html=etree.HTML(text)ul=html.xpath("//ul[@class='lists']")[0]lis = ul转载 2022-04-06 22:12:18 · 106 阅读 · 0 评论 -
【无标题】
<div class="table-responsive"> <table class="table table-bordered table-hover"> <tbody> <!-- required First 3 column names--> <tr> <td></td> <td align="center" style="vertical.转载 2022-04-02 22:35:07 · 94 阅读 · 0 评论 -
python 本地离线安装whl文件
一: 单独下载文件1、下载whl离线文件到本地,放到c盘根目录(任意位置均可,只是方便安装)https://pypi.org/https://www.lfd.uci.edu/~gohlke/pythonlibs/(推荐用这个地址下载whl文件,国内源,速度快。ctrl+f找到自己需要的文件)2、 cmd到存放whl文件的目录3、pip安装whl离线文件pip install ****.whl(****.whl是我们下载的whl的文件名称)二、批量下载...转载 2022-03-24 22:35:31 · 26997 阅读 · 1 评论