Skip to content

Commit

Permalink
Fixed error in clicking "Load more comments" or "View all n comment…
Browse files Browse the repository at this point in the history
…s" XPATH

It directly affected `follow_commenters` feature and any other WHICH uses `extract_post_info` definition.
  • Loading branch information
uluQulu committed Aug 16, 2018
1 parent 9cd18c3 commit edd91b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions instapy/commenters_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def extract_post_info(browser):
while (" comments" in comments[1].text):
more_comments += 1
print ("loading more comments.")
load_more_comments_element = browser.find_element_by_xpath("//div/ul/li[2]/a")
load_more_comments_element = browser.find_element_by_xpath("//div/ul/li[2]/button")
browser.execute_script("arguments[0].click();", load_more_comments_element)
sleep(1)
#comment_list = post.find_element_by_tag_name('ul')
Expand All @@ -54,7 +54,7 @@ def extract_post_info(browser):
while (" comments" in comments[0].text):
more_comments += 1
print ("loading more comments.")
load_more_comments_element = browser.find_element_by_xpath("//div/ul/li[1]/a")
load_more_comments_element = browser.find_element_by_xpath("//div/ul/li[1]/button")
browser.execute_script("arguments[0].click();", load_more_comments_element)
sleep(1)
#comment_list = post.find_element_by_tag_name('ul')
Expand Down

0 comments on commit edd91b4

Please sign in to comment.