Skip to content

Commit

Permalink
Merge pull request YoongiKim#46 from YoongiKim/find_elements_by_tag_n…
Browse files Browse the repository at this point in the history
…ame_error_fix

find_elements_by_tag_name error fix
  • Loading branch information
YoongiKim authored Jul 25, 2022
2 parents 3209f79 + e1e467f commit de31723
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions collect_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def google(self, keyword, add_url=""):

print('Scrolling down')

elem = self.browser.find_element_by_tag_name("body")
elem = self.browser.find_element(By.TAG_NAME, "body")

for i in range(60):
elem.send_keys(Keys.PAGE_DOWN)
Expand Down Expand Up @@ -169,7 +169,7 @@ def naver(self, keyword, add_url=""):

print('Scrolling down')

elem = self.browser.find_element_by_tag_name("body")
elem = self.browser.find_element(By.TAG_NAME, "body")

for i in range(60):
elem.send_keys(Keys.PAGE_DOWN)
Expand Down Expand Up @@ -203,7 +203,7 @@ def google_full(self, keyword, add_url=""):
self.browser.get("https://www.google.com/search?q={}&tbm=isch{}".format(keyword, add_url))
time.sleep(1)

elem = self.browser.find_element_by_tag_name("body")
elem = self.browser.find_element(By.TAG_NAME, "body")

print('Scraping links')

Expand Down Expand Up @@ -272,7 +272,7 @@ def naver_full(self, keyword, add_url=""):
"https://search.naver.com/search.naver?where=image&sm=tab_jum&query={}{}".format(keyword, add_url))
time.sleep(1)

elem = self.browser.find_element_by_tag_name("body")
elem = self.browser.find_element(By.TAG_NAME, "body")

print('Scraping links')

Expand Down

0 comments on commit de31723

Please sign in to comment.