Giter Site home page Giter Site logo

google_image_downloader's People

Contributors

atif93 avatar mahirjain25 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

google_image_downloader's Issues

No support for Python3

The current script uses urllib2, which is outdated and not supported by Python3. Further, instructions to install dependencies such as Geckodriver are not given. An alternate script for Python3 users will be very useful.

Unified script for Python2 and Python3

At present, the web scraping scripts are separated for each Python version.

There is a need to create a single script, by examining points of difference between the two versions. This would mean exploring urllib2 and urllib for Python2 and Python3 respectively, and understanding each of the Python scripts currently implemented.

Further, appropriate changes to the documentation are needed once the above has been completed.

Error while running the code

Hey,

While running your code, I face the following error

File "image_download.py", line 73, in <module> main() File "image_download.py", line 23, in main driver = webdriver.Firefox() File "/home/praveer/anaconda2/lib/python2.7/site-packages/selenium/webdriver/firefox/webdriver.py", line 144, in __init__ self.service.start() File "/home/praveer/anaconda2/lib/python2.7/site-packages/selenium/webdriver/common/service.py", line 74, in start stdout=self.log_file, stderr=self.log_file) File "/home/praveer/anaconda2/lib/python2.7/subprocess.py", line 390, in __init__ errread, errwrite) File "/home/praveer/anaconda2/lib/python2.7/subprocess.py", line 1024, in _execute_child raise child_exception OSError: [Errno 8] Exec format error

Am I missing something here ?

List index out of range

Hi found this from the stackoverflow post.

And when I tried to run it It gave me this error.


 Traceback (most recent call last):
  File "image_download.py", line 73, in <module>
    main()
  File "image_download.py", line 15, in main
    num_requested = int(sys.argv[2])
IndexError: list index out of range

Is it broken or I'm I missing something?

Not downloading anything

I tried running your code with Firefox settings, it gave me connection errors and problems so I changed webdriver to use Safari. It opens the session looks through the images I want and then exits without downloading any of them. The command i use is:

python3 image_download_python3.py 'cat' 20

The output I get is:

Total images: 0

Total downloaded: 0/0

Can you please aid me to solve the problem? Thanks.

Getting OSError

After running with python2 I am getting this error

File "image_download_python2.py", line 73, in
main()
File "image_download_python2.py", line 23, in main
driver = webdriver.Firefox()
File "/home/raushan/.virtualenvs/cv/local/lib/python2.7/site-packages/selenium/webdriver/firefox/webdriver.py", line 164, in init
self.service.start()
File "/home/raushan/.virtualenvs/cv/local/lib/python2.7/site-packages/selenium/webdriver/common/service.py", line 76, in start
stdin=PIPE)
File "/usr/lib/python2.7/subprocess.py", line 394, in init
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child
raise child_exception
OSError: [Errno 8] Exec format error

Less images found: Message: Element <input id="smb" class="ksb" type="button"> could not be scrolled into view

I want to download 1100 images for a query but it allows me only 300 with the error "Less images found: Message: Element could not be scrolled into view". I think code has the issue at some point like the nested loop has something to play

 for _ in range(int(number_of_scrolls)):
        for __ in range(10):

for the second loop value when i increase it to 120 it allows me 913 images . I am little confuse about this loop. Can you please explain what are you doing in here ? looking forward to you !

one more thing that the show more result is also not showing at the end of the page you can see in the screen shot
Screenshot (322)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.