Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12231

How to download html with curl or wget from a page using a JavaScript login sequence?

$
0
0

I am trying to scrape the "status page" of my PV system as follows:

  • In a regular browser, I simply open this page: https://enlighten.enphaseenergy.com/web/5000000/today/graph/hours
  • This opens a login screen, I enter my username/password and then the PV status page is shown under the same exact url
  • My goal is to download the status page html (behind the login-page) with curl or wget in order to parse and use in another script

Now the big question: Does anybody know how to pass the login credentials for this page with curl or wget? Looks like a JavaScript login procedure is used here: just my email and my password are enough to display the data I want to scrape... How can this be automated with a command line html download tool, if not curl/wget, I'm open to any solution which circumvents automating a heavy standard chrome browser window...

Note: Using "Remember me" at login is not my target - this saves a cookie and then I don't need to enter my login credentials for a week or two, but my multiple attempts to pass the extracted cookie (e.g. via Chrome extension "Cookie Cook") to curl/wget have failed, so now I'm hoping to go the "simple way" with the above idea. The script should also work for more than 2 weeks, so without the need to update the cookie information. Thanks for any help!


Viewing all articles
Browse latest Browse all 12231

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>