Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Mojo::UserAgent Can't locate object method "say"

by yuppie (Initiate)
on Nov 19, 2014 at 19:36 UTC ( [id://1107811]=note: print w/replies, xml ) Need Help??


in reply to Re: Mojo::UserAgent Can't locate object method "say"
in thread Mojo::UserAgent Can't locate object method "say"

I've got some output now! I can't comment it in here though, so I've used a paste service.

http://hastebin.com/yicakehoxo.xml

How can I successfully authenticate?

  • Comment on Re^2: Mojo::UserAgent Can't locate object method "say"

Replies are listed 'Best First'.
Re^3: Mojo::UserAgent Can't locate object method "say"
by blindluke (Hermit) on Nov 19, 2014 at 19:56 UTC

    First - read the response that you got. Especially this part:

    <span id="no-cookies" class="hidden warning">You appear to have cookie +s disabled.<br /><br /></span> <noscript><span class="warning">What.CD requires JavaScript to functio +n properly. Please enable JavaScript in your browser.</span><br /><br + /></noscript>

    Second, read the excellent documentation that comes with Mojo::UserAgent. Especially the examples under "scraping".

    Third, take a break to meditate.

    - Luke

      As I said, this may be a bit too advanced for me, because I have no idea what I'm doing.

      Documentation doesn't mention JavaScript at all.
Re^3: Mojo::UserAgent Can't locate object method "say"
by ww (Archbishop) on Nov 19, 2014 at 22:07 UTC

    Not clear what's your problem introducing comments when creating a node here, but, worst case, you can prepare your post locally with your favorite text-editor. Include PM markup and comments in code blocks -- and when you're happy with the appearance, do a copy/paste to the text_entry box here.


    ++$anecdote ne $data


      Thank you. I will keep that in mind when replying. But, for now, can anyone use Mojo::UserAgent to authenticate to what.cd?
        I don't know how to use Mojo, but the page sends a typical post request. The quick scan of Mojolicious' docs suggests that it must be something like
        my $response = $ua->post('https://what.cd/login.php' => form => {usern +ame => 'foo', password => 'barbaz', login => 'Log in'})

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1107811]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-19 21:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found