Haider
Haider

Reputation: 71

Get Current Browser URL without Selenium Python

Hello I want to ask if there is a way to get my current url every second printed without the selenium library in Python. Selenium would be probably the easier way i know but this is not in my interests. Thanks!

Upvotes: 1

Views: 471

Answers (1)

Matt Millar
Matt Millar

Reputation: 132

what are you trying to do, exactly? If you just want to get a request from the url you are talking about.. You can use the requests library.

To make a request, simply do:

import requests

with requests.get('https://url.com') as response:
    print(response)

If the output is Response[200], you're good.

Upvotes: 1

Related Questions