
Zhris
User
May 30, 2012, 1:19 PM
Post #2 of 2
(615 views)
|
|
Re: [gerble1000] could somebody explain what mech success checks for
[In reply to]
|
Can't Post
|
|
Hi, You would need to supply code for us to understand "unless mech success". I assume you refer to WWW::Mecahnize's success method. WWW::Mechanize is a subclass of LWP::UserAgent. The WWW::Mechanize success method is an accessor to the LWP::UserAgent is_success method. The is_success method returns a true value when a response has a successful HTTP status code i.e. 200. Its useful to combine web browsing with HTML parsing techniques. For example if you attempt to login, you could check what the resultant HTML looks like to decide whether you have successfully logged in or not. Chris
|