mercredi 30 septembre 2020

Is it possible to retrieve the results of a console command for a remote website?

For example:

If I go to https://www.yahoo.com, enter the following console command within any browser console:

localStorage.length

I would get: 2

Is it possible to accomplish above with any scripting languages?

Pseudocode: (I am using curl here, but I did not see any options to execute console command in any curl documentation, so this is probably incorrect)

    curl ("https://wwww.yahoo.com");  // establish connection to a remote site
    curl (execute console command: "localStorage.length" );  // execute console command like you would on the yahoo site
    echo (display results);  // which should be "2" in this example
    curl close; 



Aucun commentaire:

Enregistrer un commentaire