WWW::FetchStory::Fetcher::RestrictedSection - fetching module for WWW::FetchStory
version 0.2002
This is the RestrictedSection story-fetching plugin for WWW::FetchStory.
Information about the fetcher.
$info = $self->info();
The priority of this fetcher. Fetchers with higher priority get tried first. This is useful where there may be a generic fetcher for a particular site, and then a more specialized fetcher for particular sections of a site.
This must be overridden by the specific fetcher class.
$priority = $self->priority();
$priority = WWW::FetchStory::Fetcher::priority($class);
If this fetcher can be used for the given URL, then this returns true. This must be overridden by the specific fetcher class.
if ($obj->allow($url)) { .... }
Extract the story-content from the fetched content.
my ($story, $title) = $self->extract_story(content=>$content, title=>$title);
Parse the table-of-contents file.
%info = $self->parse_toc(content=>$content, url=>$url, urls=>\@urls);
This should return a hash containing:
An array of URLs for the chapters of the story. In the case where the story only takes one page, that will be the chapter. In the case where multiple URLs have been passed in, it will be those URLs.
The title of the story.
It may also return additional information, such as Summary.
Figure out the URLs for the chapters of this story.
Get the title from the content
Get the author from the content
Get the chapter title from the content
To install WWW::FetchStory, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::FetchStory
CPAN shell
perl -MCPAN -e shell install WWW::FetchStory
For more information on module installation, please visit the detailed CPAN module installation guide.