質問編集履歴
1
書式の改善
test
CHANGED
File without changes
|
test
CHANGED
@@ -12,7 +12,17 @@
|
|
12
12
|
|
13
13
|
```
|
14
14
|
|
15
|
+
href_str = html_parser.HTMLParser().unescape(div.a['m'])
|
16
|
+
|
17
|
+
AttributeError: 'HTMLParser' object has no attribute 'unescape'
|
18
|
+
|
19
|
+
2020-12-05 23:31:25,777 - INFO - downloader - no more download task for thread downloader-001
|
20
|
+
|
21
|
+
2020-12-05 23:31:25,777 - INFO - downloader - thread downloader-001 exit
|
22
|
+
|
23
|
+
2020-12-05 23:31:25,780 - INFO - icrawler.crawler - Crawling task done!
|
24
|
+
|
15
|
-
コードを実行すると
|
25
|
+
コードを実行すると上記メッセージが出てしまい保存が出来ません。
|
16
26
|
|
17
27
|
crawling task done と出ているので、コード自体は実行されていると思うのですが保存がされていません。
|
18
28
|
|
@@ -30,24 +40,10 @@
|
|
30
40
|
|
31
41
|
```python3.9
|
32
42
|
|
33
|
-
|
43
|
+
from icrawler.builtin import BingImageCrawler
|
34
44
|
|
35
|
-
|
45
|
+
Bing_crawler=BingImageCrawler(downloader_threads=1,storage={"root_dir":"img"})
|
36
46
|
|
37
|
-
2020-12-05 22:59:58,055 - INFO - downloader - no more download task for thread downloader-004
|
38
|
-
|
39
|
-
2020-12-05 22:59:58,055 - INFO - downloader - no more download task for thread downloader-003
|
40
|
-
|
41
|
-
2020-12-05 22:59:58,055 - INFO - downloader - no more download task for thread downloader-001
|
42
|
-
|
43
|
-
|
47
|
+
Bing_crawler.crawl(keyword="猫",max_num=100)
|
44
|
-
|
45
|
-
2020-12-05 22:59:58,055 - INFO - downloader - thread downloader-004 exit
|
46
|
-
|
47
|
-
2020-12-05 22:59:58,055 - INFO - downloader - thread downloader-003 exit
|
48
|
-
|
49
|
-
2020-12-05 22:59:58,056 - INFO - downloader - thread downloader-001 exit
|
50
|
-
|
51
|
-
2020-12-05 22:59:59,056 - INFO - icrawler.crawler - Crawling task done!
|
52
48
|
|
53
49
|
```
|