I'm using selenium to open a page. I'm trying to get the current opened page url but I can't seem to get it.
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
import getpass
vid = 'https://openload.co/f/KgNvMOs9fws/C__Program_Files_Python36_placeholder.mp4'
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('load-extension=C:/Users/'+getpass.getuser()+'/AppData/Local/Google/Chrome/User Data/Default/Extensions/leallakffbiflfgpmamdgcojddnbfdgo/1.1.8_0')
driver = webdriver.Chrome(chrome_options=chrome_options)
print('Start')
driver.get(vid)
print('Middle')
urlpage = driver.current_url
print(urlpage)
print('End')
I have a chrome extension that modifies the url of the video. I'm trying to grab that modified page url, but there is no point in adding a time delay since I can't grab the url of the video page in the first place for some reason. And driver.current_url
is not working.