MCPcopy
hub / github.com/InstaPy/InstaPy / scroll_down

Function scroll_down

instapy/util.py:1016–1032  ·  view source on GitHub ↗

Scroll down the page by 50 pixels This is intended mainly for accept_follow_requests(), since user could have several request to be accepted. By default only 10 users are shown, but InstaPy user could requested to accept more than 10. :param y: number of pixels to be moved

(browser, y: int = 50)

Source from the content-addressed store, hash-verified

1014
1015
1016def scroll_down(browser, y: int = 50):
1017 """
1018 Scroll down the page by 50 pixels
1019
1020 This is intended mainly for accept_follow_requests(), since user could
1021 have several request to be accepted. By default only 10 users are shown,
1022 but InstaPy user could requested to accept more than 10.
1023
1024 :param y: number of pixels to be moved
1025 """
1026
1027 browser.execute_script("window.scrollBy(0, {})".format(y))
1028 # update server calls
1029 update_activity(browser, state=None)
1030 sleep(randint(1, 5))
1031
1032 return
1033
1034
1035def click_element(browser, element, tryNum=0):

Callers 1

Calls 3

update_activityFunction · 0.85
sleepFunction · 0.85
execute_scriptMethod · 0.80

Tested by

no test coverage detected