-
Notifications
You must be signed in to change notification settings - Fork 39
How to grab the current page's URL? #85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
async def main():
browser = await zd.start(headless=True)
page = await browser.get("https://www.browserscan.net/bot-detection")
print(await page.evaluate("window.location.href", await_promise=True))
I guess using |
You get the current URL by doing: current_url = page.target.url |
@Avejack is correct, I'll mark this as completed for now. BTW, I don't think using |
Should I encountered an instance where this wasn't the case. It happened when the browser got redirected because a verification code was requested. |
Description
The above is just an example but there may be use cases during web scraping where you need to peek at the page's current URL for certain information. Is there a
get_url()
or something equivalent forzendriver
?The text was updated successfully, but these errors were encountered: