[MalaWiki] [TitleIndex] [WordIndex]

PowerBrowsingSlides/148 FlashLookAhead02

Flash Lookahead Link Extractor - 02

# SYNTAX IS: 0x00 0x83 0xlen 0x00 "string" 0x00
while ($flash =~ /\x00\x83.\x00(.*?)\x00/gs){
  my $nextitle;
  my $link = rel2abs ($1,$url);
  my $nextpage = get ($link);
  if ($nextpage =~ /<title>(.*?)<\/title>/i){
    $nextitle = $1;
  }else{
    $nextitle = $link;
  }
  print qq|<a href="$link">$nextitle</a><br>\n|;
} 


2014-06-11 14:17