Skip to content

Commit

Permalink
find_elements_by_tag_name error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
YoongiKim committed Jul 25, 2022
1 parent 3209f79 commit e1e467f
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 e1e467f

Please sign in to comment.