I am trying to scrape a site https://www.mdoffice.com.ua/ with help of Selenium module (Python). This site require entering a login and a password, for particular information, that's why I can use only Selenium for scraping. After downloading a home page and moving to the next link from this page I am trying to see current url of this page, but program shows a url of a home page and I can not scrape any information from this page (scraping is possible only of the home page). Such situation only on this site on the other sites everything is ok. Examples of code are below. How to solve this problem? Thank you!
Example 1
'''
from selenium import webdriver
import time
browser = webdriver.Chrome("D:\Programs\Chrome dr Selenium\chromedriver_90")
url = "https://www.mdoffice.com.ua/ru/amain.html"
browser.get(url)
time.sleep(3)
elem = browser.find_element_by_link_text("Инструкции MDOffice")
or elem = browser.find_element_by_xpath("/html/body/div[3]/div[2]/div[2]/nav/ul[1]/li/a") -
result is the same
time.sleep(3)
elem.click()
print(browser.current_url)
Result: https://www.mdoffice.com.ua/ru/amain.html
Result which should be: https://www.mdoffice.com.ua/ru/aMDOFAQ.decl
'''
Example 2 (Here everything is fine)
'''
from selenium import webdriver
import time
browser = webdriver.Chrome("D:\Programs\Chrome dr Selenium\chromedriver_90")
url = "https://www.bbc.com/news"
browser.get(url)
time.sleep(3)
link_1 = browser.find_element_by_link_text("Business")
time.sleep(3)
link_1.click()
page_url = browser.current_url
print(page_url)
Result: https://www.bbc.com/news/business
'''