Python中文
首页
教程
问答
标签
搜索
登录
注册
在selenium python中获取多个特定标记
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>我有一个网页,我正在<strong>抓取<strong>,有多个标签如下:</p> <pre><code> <div ng-repeat-end="" class="default-group term-" ng-class="{ 'course-converting': (!baseCourses.isCourseConversionComplete(cm.course) &amp;&amp; !cm.course.ui.showConversionInProgress), 'last-item': $last }" ng-init="baseCourses.patchData(cm)"> <bb-base-course-card ng-class="::{'first': baseCourses.isFirstNonFavorite(cm, term).ui.isNeedCreateFTUE}" membership="cm" term="term" delegated-api="baseCourses"><!-- If internal course --> <!----><div ng-if="!membership.course.ui.isExternal" class="element-card course-element-card highlight pointer bar js-course-details child-is-invokable course-color-5" data-course-id="_6138_1" bb-click-to-invoke-child="a.course-title" stop-propagation="true" ng-hide="pinned" ng-class="{ 'inactive-link': !membership.course.canAccess() || baseCourses.isSetToUltraCourse(membership.course), 'js-complete': membership.course.isComplete(), 'js-updating-conversion-status': membership.course.ui.isUpdatingConversionStatus || baseCourses.isSetToUltraCourse(membership.course), 'js-conversion-in-progress': membership.course.ui.showConversionInProgress, 'show-focus-outline': baseCourses.isFocusedCourse(membership.course.id), 'set-to-ultra-course': baseCourses.isSetToUltraCourse(membership.course) }" tabindex="-1" id="course-list-course-_6138_1"> </code></pre> <p>我想要的是“bb基础课程卡”标签下div的“数据课程id”。(也可以在最后一个标记“id”中使用,但在“课程列表课程-”之后连接。我也可以使用它。)</p> <p>有人能帮忙吗</p>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<p>你能用这个CSS选择器得到那个div吗</p> <pre><code>bb-base-course-card > div </code></pre>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
得到媒体:缩略图url从rss源
1 回答
得到对数正态随机数给定log10均值和log10标准差
9 回答
得到工作,波斯特不
3 回答
得到左半积和右半积的绝对差最小的元素
3 回答
得到幻数错误?
1 回答
得到异常错误“线程中的异常-1(最有可能在解释器关闭期间引发)”,它使用Parami
2 回答
得到循环
1 回答
得到德语的语法变化
9 回答
得到我认为是好的结果,但还不够
7 回答
得到截断svd.transform()返回float16而不是float64
5 回答
得到所有不相交的集合的并集
1 回答
得到所有函数求值组合的矩阵
10 回答
得到扭曲延迟取消错误当使用刮痧时
5 回答
得到控制台.log使用Selenium python从Chrome输出一次,然后调用第二次为空
3 回答
得到操作系统环境通过NSSM运行Python
4 回答
得到数学方程中的表达式
3 回答
得到数据库结构属性
4 回答
得到整数的后三位
8 回答
得到整数的第n位精度
6 回答
得到最低落的reddit评论
3 回答