MCPcopy Index your code
hub / github.com/InstaPy/InstaPy / get_main_element

Function get_main_element

instapy/like_util.py:82–97  ·  view source on GitHub ↗
(browser, link_elems, skip_top_posts)

Source from the content-addressed store, hash-verified

80
81
82def get_main_element(browser, link_elems, skip_top_posts):
83 main_elem = None
84
85 if not link_elems:
86 main_elem = browser.find_element(
87 By.XPATH, read_xpath(get_links_for_location.__name__, "top_elements")
88 )
89 else:
90 if skip_top_posts:
91 main_elem = browser.find_element(
92 By.XPATH, read_xpath(get_links_for_location.__name__, "main_elem")
93 )
94 else:
95 main_elem = browser.find_element(By.TAG_NAME, "main")
96
97 return main_elem
98
99
100def get_links_for_location(

Callers 2

get_links_for_locationFunction · 0.85
get_links_for_tagFunction · 0.85

Calls 1

read_xpathFunction · 0.85

Tested by

no test coverage detected