0

I have used many of the popular libraries to read html and saw variations on this website but have had no success. I go to a website, call it www.google.com. I enter passwords and I am still at www.google.com. While in this website after using my password, I hit the F12 key to view the html. Inside the html, I see a number that changes at a rate of about 2Hz. This number is also on the webpage. I want to record this changing value over a period of time. I have tried to view that page using Python and my result is a new login page of the same name. I am currently using an OCR system but it is slow and it sometimes gets an incorrect value. This website is a service that I pay a little to use. I can send a request for the value but they get angry because the site cannot handle the multiple requests. Is there a way for me to simple read the html file in Python? I have tried to use Python to open the site but it sees it as not a person.

Doug Smith
  • 51
  • 5
  • Welcome to SO! Stack Overflow is not a code-writing or tutorial service. Please [edit](https://stackoverflow.com/posts/75237819/edit) your question and post [what you have tried so far](https://meta.stackoverflow.com/q/261592), including example input, expected output, the actual output (if any), and the [full text of any errors or tracebacks](https://meta.stackoverflow.com/q/359146), all as formatted text in the question itself. Do not post images of text. The code should be a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example). – Woodford Jan 25 '23 at 17:43
  • You would have to use a headless browser to do this, since all the javascript has to be executing; you can't replicate this from just grabbing the static HTML. Selenium can do automated headless browsing. Also you need to show a [mre] of your current attempts. This is a site for showing code that you need help with, mainly. – Random Davis Jan 25 '23 at 17:47
  • https://stackoverflow.com/questions/2910221/how-can-i-login-to-a-website-with-python/51170181#51170181 This post has multiple ways to login to websites using python. https://docs.python-guide.org/scenarios/scrape/ Then can use requests to get the html page. I'm not sure how you would be able to recording the changing of the value though. – mrblue6 Jan 25 '23 at 17:58
  • I look at Selenium and see if I can get it to browse through the site without leaving a Python footprint. – Doug Smith Jan 25 '23 at 18:05

0 Answers0