MCPcopy
hub / github.com/InstaPy/InstaPy / get_current_url

Function get_current_url

instapy/util.py:1861–1873  ·  view source on GitHub ↗

Get URL of the loaded webpage

(browser)

Source from the content-addressed store, hash-verified

1859
1860
1861def get_current_url(browser):
1862 """Get URL of the loaded webpage"""
1863 try:
1864 current_url = browser.execute_script("return window.location.href")
1865
1866 except WebDriverException:
1867 try:
1868 current_url = browser.current_url
1869
1870 except WebDriverException:
1871 current_url = None
1872
1873 return current_url
1874
1875
1876def get_username_from_id(browser, user_id, logger):

Callers 4

web_address_navigatorFunction · 0.85
check_authorizationFunction · 0.85
get_usernameFunction · 0.85

Calls 1

execute_scriptMethod · 0.80

Tested by

no test coverage detected