Advertisement
szabozoltan69

get_js_enriched_html

Feb 25th, 2017
406
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var page = require('webpage').create(),
  2.   system = require('system');
  3.  
  4. if (system.args.length === 1) {
  5.   console.log('Usage: myscript.js <some URL>');
  6.   phantom.exit();
  7. }
  8.  
  9. url = system.args[1];
  10. page.open(url, function(status) {
  11.   if(status !== 'success') {
  12.         phantom.exit(1);
  13.    } else {
  14.   page.evaluate("scoreUI.click_change_Mradiotype(2)");
  15.   var that_s_it = page.evaluate(function() {
  16.     return document.body.parentNode.outerHTML;
  17.   });
  18.   console.log(that_s_it);
  19.   phantom.exit();
  20.   }
  21. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement