rover
rover

Reputation: 31

How to request data on already open chromedriver tab?

At this point i auto-logint to a website

driver.get("[example link] example.com/124f32fqw")
r = request.get(driver_current_url)
test = r.text
print(test)

but it only print the the example link without logint [Q] How can i request something from a (selenium) Chromedriver that already open

Upvotes: 0

Views: 95

Answers (1)

vitaliis
vitaliis

Reputation: 4212

your_url = driver.current_url

I answered similar question recently here How to extract the URL of a particular page using selenium/python?

For requests:

response = requests.get(url)
response.url

Upvotes: 1

Related Questions