Python中文
首页
教程
问答
标签
搜索
登录
注册
Selenium SelectBox执行器
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>版本:</p> <ul> <li>Python 2.7.6-32位</li> <li>硒2.41.0</li> <li>Firefox 24.0(需要,新版本FF挂起)</li> </ul> <p>操作系统:</p> <ul> <li>Windows Server 2008 R2,64位</li> <li>4个vCPU</li> <li>8 GB</li> <li>1:1比率的虚拟机(私有云)</li> </ul> <p>问题: 我得抓取大约:9000页,每页包含20个选择框和大约200个选项</p> <p>我只需要获取当前值,为此我使用:</p> <pre><code>Obj = ElementObj.find_element_by_name(ElementName) Select(Obj).first_selected_option.get_attribute("value") </code></pre> <p>现在的问题都是关于性能的,实际上一个页面需要30秒。 如果我尝试在没有任何selectbox的情况下对页面进行爬网,所有的爬网速度都要快得多(页面的爬网速度接近0.4秒)</p> <p>我做错什么了?你知道吗</p> <p>谢谢</p>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<p>硒通常很慢,很可能你没有做错什么。我见过许多语言都使用它,但似乎没有明显的改善。你知道吗</p> <p>希望有帮助:)</p>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
文本导入时标题行中的特殊字符
8 回答
文本小部件:在没有输入时更新并在循环后保持空闲
9 回答
文本小部件tkin
5 回答
文本小部件tkinter中的标签更改或文本外观更改是否有撤消功能?
5 回答
文本小部件tkinter复制图像选项
1 回答
文本小部件上的Python Tkinter ttk滚动条未缩放
4 回答
文本小部件上的滚动条可能需要根据制表符ord显示前进行滚动
5 回答
文本小部件不显示lis中的内容
7 回答
文本小部件不显示Unicode字符
7 回答
文本小部件中写入的行间距
2 回答
文本小部件中的文本作为变量
9 回答
文本小部件中的滚动条仅显示在底部
7 回答
文本小部件中的选项卡键空间计数
6 回答
文本小部件作为Lis
6 回答
文本小部件在主框架中扩展列宽
5 回答
文本小部件未使用删除功能清除
5 回答
文本小部件滚动动画(Tkinter、Python)
6 回答
文本居中。格式正确吗?
3 回答
文本差分算法
2 回答
文本已知时音频文件中的单词索引
1 回答