I am using python2.7 with beautiful Soup4 and Selenium webdriver
. Now in my webautomation script i will open the link or URL and get into the home page. Now I need to click onto some anchor Labels
to navigate through other pages.I did till now. now when i will be going to a new page, I need to get the new URL
from the browser as I need to pass it Beautiful Soup4
for webpage scraping. So now my concern is how to get such URLs dynamic way?
Please advice if any!
You get current_url
attribute on the driver:
from selenium import webdriver
browser = webdriver.Firefox()
browser.get('http://www.google.com')
print(browser.current_url)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With