質問編集履歴
2
html情報の変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -40,7 +40,7 @@
|
|
40
40
|
|
41
41
|
|
42
42
|
|
43
|
-
html="https://www.
|
43
|
+
html="https://www.ymori.com/books/python2nen/test2.html"
|
44
44
|
|
45
45
|
load_html=requests.get(html)
|
46
46
|
|
1
test
CHANGED
File without changes
|
test
CHANGED
@@ -48,7 +48,7 @@
|
|
48
48
|
|
49
49
|
soup=BeautifulSoup(load_html.text,"lxml")
|
50
50
|
|
51
|
-
imgs=soup.find_all("
|
51
|
+
imgs=soup.find_all("img")
|
52
52
|
|
53
53
|
|
54
54
|
|
@@ -56,7 +56,7 @@
|
|
56
56
|
|
57
57
|
filename="{}.jpg".format(i)
|
58
58
|
|
59
|
-
urllib.request
|
59
|
+
urllib.request.urlretrieve(imgs[i]["src"],filename)
|
60
60
|
|
61
61
|
time.sleep(1)
|
62
62
|
|