MCPcopy
hub / github.com/InstaPy/InstaPy / scroll_bottom

Function scroll_bottom

instapy/util.py:1001–1013  ·  view source on GitHub ↗
(browser, element, range_int)

Source from the content-addressed store, hash-verified

999
1000
1001def scroll_bottom(browser, element, range_int):
1002 # put a limit to the scrolling
1003 if range_int > 50:
1004 range_int = 50
1005
1006 for _ in range(int(range_int / 2)):
1007 # scroll down the page by 1000 pixels every time
1008 browser.execute_script("window.scrollBy(0, 1000)")
1009 # update server calls
1010 update_activity(browser, state=None)
1011 sleep(1)
1012
1013 return
1014
1015
1016def scroll_down(browser, y: int = 50):

Callers 1

likers_from_photoFunction · 0.85

Calls 3

update_activityFunction · 0.85
sleepFunction · 0.85
execute_scriptMethod · 0.80

Tested by

no test coverage detected