Skip to content

Commit

Permalink
Merge pull request ultralytics#7 from NicolasGrosjean/patch-3
Browse files Browse the repository at this point in the history
Get more than 400 images
  • Loading branch information
Joeclinton1 authored Sep 26, 2021
2 parents dd0b83d + 2f9f801 commit 7c91e00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions google_images_download/google_images_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,12 +292,12 @@ def download_extended_page(self, url, chromedriver):

element = browser.find_element_by_tag_name("body")
# Scroll down
for i in range(30):
for i in range(50):
element.send_keys(Keys.PAGE_DOWN)
time.sleep(0.3)

try:
browser.find_element_by_id("smb").click()
browser.find_element_by_xpath('//input[@value="Show more results"]').click()
for i in range(50):
element.send_keys(Keys.PAGE_DOWN)
time.sleep(0.3) # bot id protection
Expand Down

0 comments on commit 7c91e00

Please sign in to comment.