P
P
programmer101102014-08-04 21:34:22
Python
programmer10110, 2014-08-04 21:34:22

How to get page url using python mechanize?

I have a script that first opens example.com. Then the page is redirected to a new address, for example, example.com/?test=321&qwerty=156. Is there any way to get this new url?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rostislav Grigoriev, 2014-08-04
@programmer10110

response = browser.open('http://example.com')
url = response.geturl()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question