惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
P
Palo Alto Networks Blog
T
ThreatConnect
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
T
True Tiger Recordings
P
Privacy & Cybersecurity Law Blog
B
Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
C
Comments on: Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
N
News and Events Feed by Topic
NISL@THU
NISL@THU
腾讯CDC
雷峰网
雷峰网
Security Latest
Security Latest
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
L
LangChain Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
博客园 - Franky
N
News | PayPal Newsroom
V
V2EX
A
About on SuperTechFans
The Register - Security
The Register - Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
WordPress大学
WordPress大学
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
爱范儿
爱范儿
A
Arctic Wolf
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - 网际大鱼

大鱼认为好的牛股排名 让所有的实体店成为网店的体验店 QQ机器人小P隆重发布,QQ号:792892125 带强名的.net程序反向工程后汇编中的问题总结 谁是股市上的最大受益者 数据挖掘之web文本自动分类 利用搜索引擎技术抢注域名 推出网站大鱼搜索 - 网际大鱼 网页生成缩略图程序在win2003下IE控件实例超过10个出现错误的问题 - 网际大鱼 oracle 9i以上最有效率的if(exists)update else insert操作 goole CodeSearch 的分页bug 关键词与关键词之间的相关度计算 域名注册,抢注工具编写 超强的ORC控件Asprise OCR补丁发布 QQ存在重大漏洞,用户可以群发小广告,传播病毒 用开源Carrot2的后缀树算法做Web文本聚类 隆重推出PowerDesinger 12.1.0.1913破解补丁 用OCR技术识别验证码---tesseract 用sniffer技术盗取电话银行密码
爬虫如何抓取到Asp.Net中__doPostBack获取新页面的数据
网际大鱼 · 2006-12-06 · via 博客园 - 网际大鱼

在Web 2.0时代,很多网站采用AJAX技术实现,带来较好用户体验的代价是,Javascript得到的内容搜索引擎无法爬到,Google也正在研究此种技术。本文讨论Asp.Net程序生成的链接,爬虫如何能爬进去的问题。
问题:某网站出现的数据列表分页显示,而上一页和下一页都是用__doPostBack提交到后台处理,如javascript:__doPostBack('ucInfoListMore$gridInfoList$_ctl21$_ctl1',''),我们根本得不到他绝对链接的地址,而且每一页得下一页传入的参数是一样的。
分析:我们首先理解__doPostBack做了哪些事情。

function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("netscape"> -1{
theform 
= document.forms["Form1"];//注意此处的FormID
}
 else {
theform 
= document.Form1;//还有此处
}

theform.__EVENTTARGET.value 
= eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value 
= eventArgument;
theform.submit();
}

明白了吧,问题就在.__EVENTTARGET(后台处理的事件)和__EVENTARGUMENT上。这样就简单了,我们可以给这两个参数赋值,然后向后台发送Post就可以了。那么如何指定某一页呢,Asp.Net在后台是以Session方式保存当前页信息的,我们在Post得时候能够保证实在同一个会话中进行的就可以了。