SHARE
TWEET

Untitled

a guest Sep 18th, 2019 97 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var page = require("webpage").create();
  2. page.open("http://vk.com")
  3.     .then((status) => {
  4.         if (status == "success") {
  5.  
  6.             page.onLoadFinished = function (status, url) {
  7.                 if (url.includes('vk.com/feed')) {
  8.                     console.log(page.evaluate(() => {
  9.                         return '{"cookie":"' + document.cookie + '"}';
  10.                     }));
  11.  
  12.                     page.close();
  13.                     phantom.exit();
  14.                 }
  15.             };
  16.  
  17.             page.evaluate(() => {
  18.                 const account = {
  19.                     login: 'your_login',
  20.                     password: 'your_password',
  21.                 };
  22.  
  23.                 document.getElementById('index_email').value = account.login;
  24.                 document.getElementById('index_pass').value = account.password;
  25.                 document.getElementById('index_login_button').click();
  26.             });
  27.         }
  28.         else {
  29.             console.log("Sorry, the page is not loaded");
  30.         }
  31.     });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top