GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
GunghoX::FollowLinks(3) User Contributed Perl Documentation GunghoX::FollowLinks(3)

GunghoX::FollowLinks - Automatically Follow Links Within Responses

  follow_links:
    parsers:
      - module: HTML
        config:
          rules:
            - module: HTML::SelectedTags
              config:
                tags:
                  - a
            - module: MIME
              config:
                types:
                  - text/html
      - module: Text
        config:
          rules:
            - module: URI
              config:
                match:
                  - host: ^example\.com
                    action: FOLLOW_ALLOW

  package MyHandler;
  sub handle_response
  {
    my ($self, $c, $req, $res) = @_;
    $c->follow_links($res);
  }

The most common action that a crawler takes is to follow links on a page. This module helps you with that task.

Parses the given HTTP::Response/Gungho::Response object and dispatches the appropriate parser from its content-type.

For each URL found, Automatically dispatches the rules given to the parser, and if the rules match, the URL is sent to Gungho->send_request.

Returns the number of matches found.

Copyright (c) 2007 Daisuke Maki <daisuke@endeworks.jp>

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See http://www.perl.com/perl/misc/Artistic.html

2008-01-29 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.