Comments (14)
@Ajithbalakrishnan It's ok, as long as the problem is solved.
from image-downloader.
@Ajithbalakrishnan I believe you behaved a typo on '127.0.0.0:1080", which should be '127.0.0.1:1080
from image-downloader.
@sczhengyabin Thanks for your quick comment . But i have tried every combination and i got the same answer.
`python3 image_downloader.py --engine Google --driver chrome_headless --max-number 100 --output ./images --proxy_socks5 127.0.0.1:1080 apple
Scraping From Google Image Search ...
Keywords: apple
Number: 100
Face Only: False
Safe Mode: False
Query URL: https://www.google.com/search?tbm=isch&hl=en&q=apple&safe=off
/home/ajith/miniconda3/lib/python3.7/site-packages/selenium-4.0.0a5-py3.7.egg/selenium/webdriver/remote/webdriver.py:640: UserWarning: find_elements_by_* commands are deprecated. Please use find_elements() instead
warnings.warn("find_elements_by_* commands are deprecated. Please use find_elements() instead")
Find 0 images.
== 0 out of 0 crawled images urls will be used.
Finished.`
I tried the same with GUI also. But got the same results.
from image-downloader.
@Ajithbalakrishnan I can download images using exact the same args as yours.
It's more likely to be a network issue.
Maybe you network is too slow or proxy server internal error.
From my tests, if my network has issue with google webs, I will get the exact same outputs as what your commented.
from image-downloader.
@sczhengyabin I have proper network. But am woking on ubuntu with anaconda environment. I hopes that will not be a problem. I installed the requiremnets through pip.
from image-downloader.
@Ajithbalakrishnan Try using chrome mode. Which you can see visual actions in chrome browser to see where goes wrong.
from image-downloader.
@sczhengyabin I tried chrome mode in GUI. Please watch the result. Chrome promted for a second. But it went off. I checked the chrome driver also. Versin also same only.
from image-downloader.
@Ajithbalakrishnan no clue yet. Does Bing engine works?
from image-downloader.
@sczhengyabin Nope. Same result. Chrome is not showing that search results. I checked the internet. I have good network.
@sczhengyabin Please share the dependancies and its versions that u have used.
from image-downloader.
requests==2.18.4
selenium==3.141.0
PyQt5==5.14.2
generated using pipreqs
Seems to me still a network issue, at least for this project.
To verify, you can setup proxy using 'proxychains', rather than the proxy option in this project.
# config in /etc/proxychains.conf
proxychains python3 image_downloader.py ...
from image-downloader.
`proxychains python3 image_downloader.py --engine Google --driver chrome_headless --max-number 100 --output ./images --proxy_socks5 127.0.0.1:1080 apple
ProxyChains-3.1 (http://proxychains.sf.net)
Scraping From Google Image Search ...
Keywords: apple
Number: 100
Face Only: False
Safe Mode: False
Query URL: https://www.google.com/search?tbm=isch&hl=en&q=apple&safe=off
|S-chain|-<>-127.0.0.1:1080-<--timeout
|DNS-request| localhost
|S-chain|-<>-127.0.0.1:1080-<--timeout
|DNS-response|: localhost does not exist
|DNS-request| localhost
|S-chain|-<>-127.0.0.1:1080-<--timeout
|DNS-response|: localhost does not exist
`
I am adding my proxychains.config file below.
I tried to change the line "socks4 127.0.0.1 9050" in proxychain config file to 127 0 0 1 1080. But no use.
from image-downloader.
@Ajithbalakrishnan
proxychains conf should be
socks5 127.0.0.1 1080
if you can use proxychains to downloads other things, e.g. apt-get, then it's an issue with Image-Downloader, other wise it's definitely something wrong with your socks5 proxy configuration.
from image-downloader.
@sczhengyabin Its working now. I made some changes in /etc/proxychains config file.
- Strict chain to dynamic chain
- added one more line in last socks5 127.0.0.1 9050
Then i have installed Tor,pysocks in my environment.
sudo apt-get install tor
pip install PySocks
As the sock5 port has been changed, so command will be
python3 image_downloader.py --engine Google --driver chrome_headless --max-number 100 --output ./images/kerlaflood --proxy_socks5 127.0.0.1:9050 kerlaflood2018
Hopes this might helpful for others. Sorry for wasting your valuable time.
from image-downloader.
fwiw I have a similar issue but only with Google. I think the reason is that google shows a "before you continue to google" page - that's what I quickly see in the interactive Chrome option, before it closes.
Using Bing instead works.
from image-downloader.
Related Issues (20)
- 爬百度图片的数量问题 HOT 3
- Any ideas? HOT 2
- hi~我是一个正在学习ai的学生,使用您的爬虫爬取baidu图片,特此求助:使用gui方式打开,选取baidu,搜索关键字,点击start,然后就会报错如下 HOT 8
- Key error: 'listnum' HOT 2
- AttributeError
- Is there are way to set image resolution?
- Unsplash search engine, and firefox browser enhancement and image resolution preferences HOT 1
- win10+wsl2 ubuntu20.04+chrome92.0.4515.107+ChromeDriver+92.0.4515.43 error
- Error when downloading pics using chrome HOT 2
- Error DevToolsActivePort file doesn't exist HOT 2
- 新版selenium不支持PhantomJS 要用老版本吗 HOT 1
- JSONDecodeError
- How can I rename the download it files with the keywords. HOT 1
- 支持mac吗 HOT 3
- 无法下载百度图片
- driver = webdriver.PhantomJS(executable_path=phantomjs_path报错如下
- No module named 'PyQt5' HOT 2
- 对chrome版本是否有限制 HOT 1
- 无法用,selenium 的version你都不说是多少,版本一更新一堆报错,全是历史版本不兼容
- 使用谷歌搜索一直报错,是否需要升级什么版本?Can not find chromedriver for currently installed chrome version HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from image-downloader.