如何使用HTML :: Parser解析内容

时间:2015-08-26 08:40:40

标签: html perl html-parsing www-mechanize

我的网页有不同的网址 我创建了脚本以从页面到WWW::Mechanize Perl模块获取URL。

my @links = $mech->find_all_links( text_regex => qr/client_update/i  );
   foreach (@links) {
        push (@new_arr, $_->url() ,"\n");
      }

现在我应该只获得灰色网址,检查带有属性和值的标记名称:

<td class="highlight-grey" data-highlight-colour="**grey**"><a href="http://cache.download.it/download/soker/client_update.php">cache.download.it/download/soker/client_update.php</a></td>
顺便说一句,我没有可能为我的任务安装像“HTML :: TreeBuilder”这样的模块。

0 个答案:

没有答案
相关问题