Show name of the current open website in any browser using python code

Viewed 37

I have been working on a python code which shows the time spent on an applicaton based on keyboard and mouse movement. I can set the start and stop time, the output of this code is the duration I spend on each application in the set duration. I have also added "idle time" which happens when I am not working on the system.

My question is, In case I am using a browser app like chrome or firefox or others, I need the name of the website. This will help me track how much time I am spenting on those websites

1 Answers

You should 100% use Selenium. It's a browser automation tool that uses python to automate web browsers. I personally use it to automate YouTube uploads. You can do what your trying to do with a few commands, selenium is one of the best tools for this usecase!

Here's the github! - https://github.com/SeleniumHQ/selenium

Related