Giter Club home page Giter Club logo

mto-rates-scraper's People

Contributors

nknj avatar

Watchers

 avatar  avatar

Forkers

kenzyapp

mto-rates-scraper's Issues

Get Headers after login western-union with casperjs

Hello freind
I need to login western-union with casperjs and get all headers after login .
Trying to run my script i got on debug consol this error:

[warning] [remote] unable to submit form

here my code:

var casper = require('casper').create({
    verbose: true,
    logLevel: 'debug',
    waitTimeout: 5000,
    userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4',
    viewportSize:{width: 1600, height: 900}
})
.on('error', function(msg) {
    this.echo('Error: ' + msg, "ERROR");
})
.on('remote.message', function(msg) {this.echo('The error from evaluate: ' + msg, "ERROR");})
.start('https://www2.westernunion.com/fr/fr/send-money/app/login/', function() {
    //this
    //.click('#signin_link');
    this.wait(0,function(){var i=0;
    function snap(){i++;casper.capture('foo_'+i+'.jpg', undefined,{format: 'jpg',quality: 75});if(i<4){setTimeout(snap,1000)}}snap();
    })
    .fillSelectors('form', {
        '#txtEmailAddr' : '[email protected]',
        '#txtKey':  'tictac@2009'
    }, true)
    .waitForSelector("#btn-do-login",
    function success() {
        this
            
	    .echo('logged in!', 'INFO')
            .capture('in.png')
    },
    function fail(){
        this
            .capture('failed.png')
            .echo('failed to login', 'ERROR');
    })
})
//Header
.then(function dumpHeaders(){
  console.log("getting headers");
	this.currentResponse.headers.forEach(function(header){
    console.log(header.name +': '+ header.value);
  })
})
.run()

any help

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.