NAME
HTML::Scrape - Helper functions for scraping text from HTML tags
VERSION
Version 0.3.0
SYNOPSIS
Handy helpers for common HTML scraping tasks.
use HTML::Scrape;
my $ids = HTML::Scrape::scrape_all_ids( $html );
WARNINGS
You can enable parsing warnings by setting $HTML::Scrape::WARNINGS
to a true value. By default, no warnings are emitted.
NOTES FOR FUTURE DOCS
If a tag exists but has no content, including empty tags like <hr>
, then it will have an empty string for content. This way you can test for existence of these tags.
FUNCTIONS
scrape_id( $id, $html )
Scrapes the text of the single ID $id
from $html
.
scrape_all_ids( $html [, $specific_id ] )
Parses the entire web page and returns all the text in a hashref keyed on ID.
If you pass in $specific_id
, then only that ID will be scraped, and parsing will stop once it is found. The better way to do this is by calling scrape_id
.
AUTHOR
Andy Lester, <andy at petdance.com>
BUGS
Please report any bugs or feature requests at https://github.com/petdance/html-scrape/issues..
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc HTML::Scrape
You can also look for information at:
Search CPAN
LICENSE AND COPYRIGHT
This software is Copyright (c) 2023 by Andy Lester.
This is free software, licensed under: The Artistic License 2.0 (GPL Compatible)