The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

SoggyOnion::Plugin::ImageScraper - get images from a page

SYNOPSIS

In config.yaml:

    layout:
      - title: Comic Strips
        name:  comics.html
        items:
          - images: http://www.myfavoritestrip.com/
            id:  myfavoritestrip
            offset: 4
            limit: 1

DESCRIPTION

This is a plugin for SoggyOnion that grabs a series of <IMG> tags from a URI and adds them to the SoggyOnion output page.

Item Options

  • images - the URI of the page to scrape the image(s) from

  • id - the item ID that appears in the HTML <DIV> tag

  • offset - (optional) the index of the first image, default is 0 (first image)

  • limit - (optional) how many images to show past the offset, default is 1

  • prefix - (optional) prefix the output URI of the image with this. By default, checks the IMG SRC. If it's relative it prepends the prefix if you set it or the URI specified with images.

SEE ALSO

SoggyOnion

AUTHOR

Ian Langworth, <ian@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2004 by Ian Langworth

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