NewsExtractor

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

      "runtime" : {
         "requires" : {
            "File::Slurp" : "0",
            "HTML::ExtractContent" : "0",
            "HTTP::Date" : "0",
            "IO::Socket::SSL" : "2.009",
            "Importer" : "0",
            "JSON" : "0",
            "Mojolicious" : "8.25",
            "Moo" : "0",
            "Ref::Util" : "0",
            "SemanticWeb::Schema" : "0",
            "Test2::V0" : "0",
            "Try::Tiny" : "0",
            "Type::Tiny" : "0",
            "Types::URI" : "0",
            "YAML" : "0"
         }
      }
   },
   "provides" : {

META.yml  view on Meta::CPAN

    file: lib/NewsExtractor/Types.pm
requires:
  File::Slurp: '0'
  HTML::ExtractContent: '0'
  HTTP::Date: '0'
  IO::Socket::SSL: '2.009'
  Importer: '0'
  JSON: '0'
  Mojolicious: '8.25'
  Moo: '0'
  Ref::Util: '0'
  SemanticWeb::Schema: '0'
  Test2::V0: '0'
  Try::Tiny: '0'
  Type::Tiny: '0'
  Types::URI: '0'
  YAML: '0'
resources:
  bugtracker: https://github.com/perltaiwan/NewsExtractor/issues
  repository: https://github.com/perltaiwan/NewsExtractor.git
version: v0.45.0

cpanfile  view on Meta::CPAN

requires 'JSON';
requires 'Mojolicious', '8.25';
requires 'Moo';
requires 'SemanticWeb::Schema';
requires 'Test2::V0';
requires 'Try::Tiny';
requires 'Type::Tiny';
requires 'Types::URI';
requires 'YAML';
requires 'HTTP::Date';
requires 'Ref::Util';

lib/NewsExtractor/SiteSpecificExtractor/news_pts_org_tw.pm  view on Meta::CPAN

package NewsExtractor::SiteSpecificExtractor::news_pts_org_tw;
use utf8;
use Moo;

extends 'NewsExtractor::JSONLDExtractor';
with 'NewsExtractor::Role::ContentTextExtractor';

use HTML::ExtractContent;
use Importer 'NewsExtractor::TextUtil' => ('html2text', 'reformat_dateline');
use Importer 'Ref::Util' => ('is_hashref');

sub journalist {
    my ($self) = @_;
    my $name;
    my $author = $self->schema_ld->{author};
    if (is_hashref($author) && exists($author->{"name"})) {
        $name = $author->{"name"};
    } else {
        $name = $author;
    }



( run in 0.278 second using v1.01-cache-2.11-cpan-4d50c553e7e )