Changeset 127

Show
Ignore:
Timestamp:
10/05/06 08:30:39 (2 years ago)
Author:
evdb
Message:

FIx to scraping issue

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/bin/make_google_sitemap.pl

    r125 r127  
    2828 
    2929print $SM "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; 
    30 print $SM "<urlset xmlns=\"http://www.google.com/schemas/sitemap/0.84\">\n"; 
     30print $SM "<urlset xmlns=\"http://www.google.com/schemas/sitemap/0.84\">\n\n"; 
    3131 
    3232print "Will add " . $all_nodes_query->rows() . " threads to the sitemap\n\n"; 
     
    5656     $lastmod =~ s/^(\S+).*$/$1/; 
    5757 
    58     print $SM "     <url>\n"; 
    59     print $SM "      <loc>http://prlmnks.org/html/$r->{node_id}.html</loc>\n"; 
    60     print $SM "      <lastmod>$lastmod</lastmod>\n"; 
    61     print $SM "     </url>\n"; 
     58    print $SM "  <url>\n"; 
     59    print $SM "    <loc>http://prlmnks.org/html/$r->{node_id}.html</loc>\n"; 
     60    print $SM "    <lastmod>$lastmod</lastmod>\n"; 
     61    print $SM "  </url>\n\n"; 
    6262 
    6363    # print $SM "      < changefreq>monthly</changefreq>\n"; 
  • trunk/lib/PrlMnks/Node.pm

    r120 r127  
    304304    my $self = shift; 
    305305    return if $self->{data}{root_node_id}; 
    306     return if !PrlMnks::Type->get( $self->{data}{type_name} )->{is_top}; 
     306 
     307    my $type = PrlMnks::Type->get( $self->{data}{type_name} ); 
     308    return unless $type && $type->{is_top}; 
     309 
    307310    return 1; 
    308311}