質問編集履歴
5
文の追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -63,7 +63,7 @@
|
|
63
63
|
```
|
64
64
|
|
65
65
|
下記が上記のコードで私が解答した正誤が分かる箇所
|
66
|
-
つまり、installのほうは正解でorientationは不正解
|
66
|
+
つまり、installのほうは正解でorientation、renownedは不正解
|
67
67
|
```False
|
68
68
|
<div data-v-2d259044="" class="result-check-line__true-false is-false">
|
69
69
|
|
4
文の追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -27,8 +27,8 @@
|
|
27
27
|
</div>
|
28
28
|
</div>
|
29
29
|
<div data-v-2d259044="" class="result-check-line__icon">
|
30
|
-
<div data-v-2d259044="" class="result-check-line__true-false is-true">
|
30
|
+
<div data-v-2d259044="" class="result-check-line__true-false is-true">
|
31
|
-
|
31
|
+
</div>
|
32
32
|
</a>
|
33
33
|
|
34
34
|
|
@@ -43,11 +43,23 @@
|
|
43
43
|
</div>
|
44
44
|
</div>
|
45
45
|
<div data-v-2d259044="" class="result-check-line__icon">
|
46
|
-
<div data-v-2d259044="" class="result-check-line__true-false is-false">
|
46
|
+
<div data-v-2d259044="" class="result-check-line__true-false is-false">
|
47
|
+
</div>
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a data-v-2d259044="" href="#" class="result-check-line">
|
51
|
+
<div data-v-2d259044="" class="result-check-line__main">
|
52
|
+
<div data-v-2d259044="" class="result-check-line__main__top">
|
53
|
+
<span data-v-2d259044="">renowned</span>
|
54
|
+
</div>
|
55
|
+
<div data-v-2d259044="" class="result-check-line__main__sub">
|
56
|
+
<span data-v-2d259044="">名高い、著名な</span>
|
57
|
+
</div>
|
47
58
|
</div>
|
59
|
+
<div data-v-2d259044="" class="result-check-line__icon">
|
60
|
+
<div data-v-2d259044="" class="result-check-line__true-false is-false">
|
48
|
-
|
61
|
+
</div>
|
49
62
|
</a>
|
50
|
-
|
51
63
|
```
|
52
64
|
|
53
65
|
下記が上記のコードで私が解答した正誤が分かる箇所
|
@@ -60,6 +72,18 @@
|
|
60
72
|
<div data-v-2d259044="" class="result-check-line__true-false is-true">
|
61
73
|
```
|
62
74
|
classの部分で抽出するものを分けたいがどうすればいいのかさっぱり
|
75
|
+
```python
|
76
|
+
from selenium import webdriver
|
77
|
+
driver = webdriver.Chrome('chromedriver.exe')
|
78
|
+
url = '********'
|
79
|
+
driver.get(url)
|
80
|
+
|
81
|
+
elems_Q = driver.find_elements_by_class_name('result-check-line__main__top')
|
82
|
+
elems_Q[0].text #output -> 'install'
|
83
|
+
|
84
|
+
elems_A = driver.find_elements_by_class_name('result-check-line__main__sub')
|
85
|
+
elems_A[0].text #output -> '設置する、導入する'
|
86
|
+
```
|
63
87
|
###試したこと
|
64
88
|
```python
|
65
89
|
#単純な英単語、日本語訳の抽出はできた
|
@@ -71,7 +95,7 @@
|
|
71
95
|
|
72
96
|
|
73
97
|
|
74
|
-
#理想はここで
|
98
|
+
#理想はここで不正解のみ(orientation, 新入社員向け説明会とrenowned, 名高い、著名な)を出力してほしかった
|
75
99
|
elems_F = driver.find_elements_by_class_name('result-check-line__true-false is-false')
|
76
100
|
elems_F
|
77
101
|
#output -> [] 要素がないので当たりですが空っぽ
|
3
文法の修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -71,9 +71,10 @@
|
|
71
71
|
|
72
72
|
|
73
73
|
|
74
|
-
|
74
|
+
#理想はここで'install, 設置する、導入する'と出力してほしかった
|
75
75
|
elems_F = driver.find_elements_by_class_name('result-check-line__true-false is-false')
|
76
76
|
elems_F
|
77
77
|
#output -> [] 要素がないので当たりですが空っぽ
|
78
|
+
|
78
79
|
```
|
79
80
|
自分でもよくわかっていないので質問が非常に分かりにくくなっていると思いますがよろしくお願いします。
|
2
文法の修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -72,7 +72,7 @@
|
|
72
72
|
|
73
73
|
|
74
74
|
|
75
|
-
elems_F = driver.find_elements_by_class_name('result-check-line__true-false ')
|
75
|
+
elems_F = driver.find_elements_by_class_name('result-check-line__true-false is-false')
|
76
76
|
elems_F
|
77
77
|
#output -> [] 要素がないので当たりですが空っぽ
|
78
78
|
```
|
1
文法の修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -63,10 +63,10 @@
|
|
63
63
|
###試したこと
|
64
64
|
```python
|
65
65
|
#単純な英単語、日本語訳の抽出はできた
|
66
|
-
elems_Q =
|
66
|
+
elems_Q = driver.find_elements_by_class_name('result-check-line__main__top')
|
67
67
|
elems_Q[0].text #output -> 'install'
|
68
68
|
|
69
|
-
elems_A =
|
69
|
+
elems_A = driver.find_elements_by_class_name('result-check-line__main__sub')
|
70
70
|
elems_A[0].text #output -> '設置する、導入する'
|
71
71
|
|
72
72
|
|