View Single Post
  #45  
Old 05-12-2015, 03:40 AM
James Halpert James Halpert is offline
Junior Member
 
Join Date: Apr 2015
Posts: 24
James Halpert is on a distinguished road
Default

Re: MFC, how to see who is online?


Sorry I got distracted with other things but I managed to get you one step a little further.

To get around the #enter_desktop button you can simply invoke a reload (try it a browser incognito mode, first the button appears, refresh and you do not get prompted with anything).

Being that I literally only heard of CasperJS from your post I am a total noob at this. But I was able to take your code and add a couple tweaks:
  1. Declares the User_Agent so that you look like an average user in their webserver access log files.
  2. Circumvents the #enter_desktop challenge.

Here is what I got so far:

Code:
var casper = require('casper').create();

// User Agent for "Google Chrome Generic Running on Windows 8.1 64-bit"
casper.userAgent('Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36');

casper.start('http://myfreecams.com/#Homepage', function() {
  this.echo(this.getTitle());
  casper.capture('step1.png');
  this.reload(function() {
    this.wait(2000, function() {
      casper.capture('step2.png');
    });
  });
});
casper.run();
Unfortunately I'm going to be AFK for about 18 hours or so, but when I get back I'm totally going to see about going further with CasperJS.

I think this is going to be the smoking gun that I've been looking for to be able to do this efficiently, so thanks for bringing this to my attention!
Reply With Quote