WWW::Mechanize 查找链接并关注链接
使用 WWW::Mechanize,我尝试找到 text_regex => 的链接qr/Next/
并成功跟踪链接,但我对如下所示的链接遇到问题:
"< img alt="" src="images/pager-spacer.gif" >
< input type="submit" class="link-btn" id="ctl00_ctl00_ContentPlaceHolder1_phSearchHeader_pgrTop_btnNext" onclick="javascript:suppressPopUp();" value="Next" name="ctl00$ctl00$ContentPlaceHolder1$phSearchHeader$pgrTop$btnNext> < img alt="" src="images/gtn.gif"> "
How do I find and follow link like that.
谢谢。
Using WWW::Mechanize, I've try to find link with text_regex => qr/Next/
and follow the link with success, but I'm having problem with the link that look like this:
"< img alt="" src="images/pager-spacer.gif" >
< input type="submit" class="link-btn" id="ctl00_ctl00_ContentPlaceHolder1_phSearchHeader_pgrTop_btnNext" onclick="javascript:suppressPopUp();" value="Next" name="ctl00$ctl00$ContentPlaceHolder1$phSearchHeader$pgrTop$btnNext> < img alt="" src="images/gtn.gif"> "
How do I find and follow link like that.
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于输入类型为提交,您是否尝试仅提交表单,
$mech->submit();
应该可以工作Did you try to just submit the form since the input type is submit,
$mech->submit();
should work