回答編集履歴
3
修正
test
CHANGED
@@ -110,31 +110,31 @@
|
|
110
110
|
|
111
111
|
|
112
112
|
|
113
|
-
|
113
|
+
html = driver.page_source.encode('utf-8')
|
114
114
|
|
115
|
-
|
115
|
+
soup = BeautifulSoup(html, "html.parser")
|
116
116
|
|
117
|
-
|
117
|
+
elems = soup.select('#thumbnail')
|
118
118
|
|
119
|
-
|
119
|
+
result_video_list = []
|
120
120
|
|
121
121
|
|
122
122
|
|
123
|
-
|
123
|
+
for elem in elems:
|
124
124
|
|
125
|
-
|
125
|
+
result_video_list.append(elem.get("href"))
|
126
126
|
|
127
127
|
|
128
128
|
|
129
|
-
|
129
|
+
for test in result_video_list:
|
130
130
|
|
131
|
-
|
131
|
+
try:
|
132
132
|
|
133
|
-
|
133
|
+
pprint('https://www.youtube.com' + test)
|
134
134
|
|
135
|
-
|
135
|
+
except:
|
136
136
|
|
137
|
-
|
137
|
+
continue
|
138
138
|
|
139
139
|
|
140
140
|
|
2
修正
test
CHANGED
@@ -80,7 +80,7 @@
|
|
80
80
|
|
81
81
|
#
|
82
82
|
|
83
|
-
DRIVER_PATH = '
|
83
|
+
DRIVER_PATH = 'ドライバーパス'
|
84
84
|
|
85
85
|
driver = webdriver.Chrome(executable_path=DRIVER_PATH, chrome_options=options)
|
86
86
|
|
1
修正
test
CHANGED
@@ -100,7 +100,7 @@
|
|
100
100
|
|
101
101
|
|
102
102
|
|
103
|
-
for i in range(
|
103
|
+
for i in range(50): #回数は調整してください
|
104
104
|
|
105
105
|
# # # 一番下までスクロールする
|
106
106
|
|