QianyanTech / Image-Downloader

Download images from Google, Bing, Baidu. 谷歌、百度、必应图片下载.
MIT License
2.19k stars 572 forks source link

download image failed #14

Closed LizzieOneDay closed 5 years ago

LizzieOneDay commented 5 years ago

Hello, I met this error when running the GUI program.

Fail: http://g.hiphotos.baidu.com/zhidao/wh%3D450%2C600/sign=e5c2877a6f600c33f02cd6cc2f7c7d39/cefc1e178a82b901c431875d778da9773812efc4.jpg (MaxRetryError("HTTPConnectionPool(host='g.hiphotos.baidu.com', port=80): Max retries exceeded with url: /zhidao/wh%3D450%2C600/sign=e5c2877a6f600c33f02cd6cc2f7c7d39/cefc1e178a82b901c431875d778da9773812efc4.jpg (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x000000000361E208>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed',))",),) [13:16:30] ## Fail: http://www.mkwd.gov.ph/new-wordpress/wp-content/uploads/2015/02/asas-001.jpg (MaxRetryError("HTTPConnectionPool(host='www.mkwd.gov.ph', port=80): Max retries exceeded with url: /new-wordpress/wp-content/uploads/2015/02/asas-001.jpg (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x00000000059F2A20>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed',))",),) [13:16:30] ## Fail: http://www.micronbot.com/usr/uploads/2017/03/704946529.png (MaxRetryError("HTTPConnectionPool(host='www.micronbot.com', port=80): Max retries exceeded with url: /usr/uploads/2017/03/704946529.png (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x0000000003610A20>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed',))",),)

sczhengyabin commented 5 years ago

Try add max try times or sleep time after each trial. Look for related code in crawler.py.