问题描述
我正在研究这个基于 php 的刮板/爬虫,它工作正常,直到它获得 .net 生成的 herf 链接 __doPostBack(...),知道如何处理这个问题并抓取这些链接后面的页面吗?
I am working on this php base scraper/crawler, which works fine until it get .net generated herf link __doPostBack(...), any idea how to deal with this and crawl page behind those links ?
推荐答案
与其尝试自动单击 JavaScript 按钮(这需要 PHP 中的其他库),不如尝试复制单击按钮后浏览器发送的请求.有各种 firefox 扩展可以帮助您检查请求,例如 TamperData、Firebug 和 LiveHttp.
Instead of trying to automate clicking the JavaScript button, which requires additional libraries in PHP, try replicating what request is sent by your browser after clicking the button. There are various firefox extensions that will help you examine the request, such as TamperData, Firebug, and LiveHttp.
这篇关于关于如何抓取 __doPostBack('...'); 后面的页面的任何想法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!