Changeset 509

Show
Ignore:
Timestamp:
04/02/06 17:23:34
Author:
miyagawa
Message:
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/assets/plugins/filter-entryfulltext/cnet_japan.yaml

    r508 r509  
    11author: tokuhirom <tokuhirom@cpan.org> 
    2 handle_force: http://feeds.feedburner.jp/cnet/ 
     2handle_force: http://(feeds\.feedburner\.jp/cnet|japan\.cnet\.com/news) 
    33extract: (<div class="j5 mb15">.+?)(?:<div class="ad_under_b">|<div class="bd1">|<a target="_top" class="ad"|<div class="pl10 pr15 mb10">) 
    44extract_capture: body 
    5 extract_after_hook: $data->{body} =~ s!(src=")([^h])!$1http://japan.cnet.com$2!g 
     5#extract_after_hook: $data->{body} =~ s!(src=")([^h])!$1http://japan.cnet.com$2!g 
  • trunk/plagger/lib/Plagger/Plugin/Filter/EntryFullText.pm

    r503 r509  
    105105 
    106106    $args->{content} = decode_content($res); 
     107 
     108    # if the request was redirected, set it as permalink 
     109    my $base = $res->http_response->base; 
     110    if ( $base ne $args->{entry}->permalink ) { 
     111        $context->log(info => "rewrite permalink to $base"); 
     112        $args->{entry}->permalink($base); 
     113    } 
    107114 
    108115    my @plugins = $handler ? ($handler) : @{ $self->{plugins} };