Skip to content

Commit

Permalink
Patched click connections - v. 1.0.4
Browse files Browse the repository at this point in the history
While searching for connections if username was too big it could possibly click on it and be redirected to their instagram's profile because Google Chrome clicks in the center of the element
  • Loading branch information
Fytex authored Sep 16, 2020
1 parent 991b1cb commit 3c2a88d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/instagram_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def generate(self) -> Iterator[str]:

class Bot:

__version__ = '1.0.3'
__version__ = '1.0.4'


def __init__(self, window:bool=True, timeout=30):
Expand Down Expand Up @@ -173,7 +173,8 @@ def get_user_connections(self, username:str, limit:int=None, followers=True) ->
connections_list = self.driver.find_element_by_css_selector('div[role=\'dialog\'] ul')
connections_count = len(connections_list.find_elements_by_css_selector('li'))

connections_list.click()
not_button_area = self.driver.find_element_by_css_selector('div[role=\'dialog\'] ul li > div > div > div:nth-of-type(2)')
not_button_area.click()

action_chain = webdriver.ActionChains(self.driver)

Expand Down

0 comments on commit 3c2a88d

Please sign in to comment.