苏飞论坛

 找回密码
 马上注册

QQ登录

只需一步,快速开始

分布式系统框架(V2.0) 轻松承载百亿数据,千万流量!讨论专区 - 源码下载 - 官方教程

HttpHelper爬虫框架(V2.7-含.netcore) HttpHelper官方出品,爬虫框架讨论区 - 源码下载 - 在线测试和代码生成

HttpHelper爬虫类(V2.0) 开源的爬虫类,支持多种模式和属性 源码 - 代码生成器 - 讨论区 - 教程- 例子

查看: 6356|回复: 7

[HttpHelper] postback获取不到下一页有好的解决办法吗?

[复制链接]
发表于 2019-8-19 08:55:53 | 显示全部楼层 |阅读模式
群主求教,postback获取不到下一页有好的解决办法吗?




1. 开通SVIP会员,免费下载本站所有源码,不限次数据,不限时间
2. 加官方QQ群,加官方微信群获取更多资源和帮助
3. 找站长苏飞做网站、商城、CRM、小程序、App、爬虫相关、项目外包等点这里
 楼主| 发表于 2019-8-19 10:04:29 | 显示全部楼层
补充下,爬取的网站上面有个<A id=LinkBtnNext href="javascript:__doPostBack('LinkBtnNext','')">下一页</A>,原来的时候可以正常读取,更新后,获取首页之后不能跳转到下一页了
 楼主| 发表于 2019-8-19 10:05:00 | 显示全部楼层
可以有偿解决问题的也可以,请联系!
发表于 2019-8-19 10:12:34 | 显示全部楼层
你这个跳转是怎么执行的,单击还是程序执行。抓到包直接模拟提交试试
 楼主| 发表于 2019-8-19 10:29:23 | 显示全部楼层
public string GetPageList(string cookieStr, int page)
    {
        string str = "http://" + this.host + "/kssjwpt/MasterPage/JBXX_NEW.aspx?Id=&JSH=&XM=&XB=&BM=&ZJH=&RSXZ=&NL_ST=&NL_ED=&ZZ=&BAHJ=&BADW=&CSRQ_ST=&CSRQ_ED=&SYDW=&RSRQ_ST=&RSRQ_ED=&CSSJ_ST=&CSSJ_ED=&HJD=&AY=&CSYY=&DAWZ=&DWLX=&Faint=Yes&ZSZT=1&type=Ser";
        int num = 10;
        int num2 = ((page - 1) * num) + 1;
        int num3 = num2 + 9;
        HttpHelper helper = new HttpHelper();
        HttpItem item = new HttpItem
        {
            Method = "Get",
            URL = str,
            Postdata = $"__EVENTTARGET=LinkBtnNext&__EVENTARGUMENT=&__VIEWSTATE=%2FwEPDwUJNzgwMDkwMDc2DxYEHgh3aGVyZVN0cgUWIEFORCBBLlpTWlQgTElLRSAnMSUnIB4JSkJYWExCU1FMBfYBIEZST00gd2F0Y2hkYi5qYnh4IEEgIGxlZnQgam9pbiBXQVRDSERCLlhYRE0geHg2ICBvbiB4eDYuZmllbGRuYW1lICA9ICdYWlFIJyBhbmQgeHg2LmNvZGU9QS5ISkQgIGxlZnQgam9pbiBXQVRDSERCLlhYRE0geHg3ICBvbiB4eDcuZmllbGRuYW1lICA9ICdYU0FKJyBhbmQgeHg3LmNvZGU9QS5BWSAgV0hFUkUgQS5MRkZIIExJS0UgJzM3MTUyMjExMSUnICBBTkQgQS5aU1pUIExJS0UgJzElJyAgT1JERVIgQlkgQS5SU1JRIERFU0MgFgICAw9kFgQCDw88KwANAQAPFggeC0FsbG93UGFnaW5nZx4IUGFnZVNpemUCEh4LXyFEYXRhQm91bmRnHgtfIUl0ZW1Db3VudAIKZBYCZg9kFhgCAQ8PZBYKHgpvbmRibGNsaWNrBRRzaG93SkJYWERldGFpbCh0aGlzKR4Hb25jbGljawUjcXVlcnlTdWIodGhpcyk7bW9kaWZ5Um93Q29sb3IodGhpcykeBXN0eWxlBQtjdXJzb3I6aGFuZB4Lb25tb3VzZW92ZXIFD2NoZWNrT3Zlcih0aGlzKR4Kb25tb3VzZW91dAUOY2hlY2tPdXQodGhpcykWFmYPZBYQAgEPDxYCHgRUZXh0BQgyMDE3MDcwM2RkAgMPDxYCHwsFFTM3MTUyMjExMTIwMTcxMTE3MDAwMmRkAgUPDxYCHwsFAjExZGQCBw8PFgIfCwUBMGRkAgkPDxYCHwtlZGQCCw8PFgIfC2VkZAINDw8WAh8LBQoxMTExMTExMTExZGQCDw8PFgIfCwUBMGRkAgEPDxYCHwsFCTIwMTcwMDcwM2RkAgIPDxYCHwsFCeasp%2BWjq%2BWGm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kAgsPDxYCHgdWaXNpYmxlaGRkAgwPDxYCHwxoZGQCEQ9kFgJmD2QWAmYPZBYGAgEPDxYCHwsFATFkZAIDDw8WAh8LBQIyMmRkAgUPDxYCHwsFAzIxM2RkGAEFCUdyaWRWaWV3MQ88KwAKAQgCAWSKPMYdyGZCTWkqrWGxkOJXEr8T%2Bg%3D%3D&__EVENTVALIDATION=%2FwEWDQKG3vaxDQKl%2FpqeAwKropaOAwLjvvOnCAKd6tSMBwKv5s%2BMDALMhPiFBgKa7byuAgLDtNuKCwLKwoiiBgKn8Ij2BAKj8MT2AwK%2B7%2BbtDNOPWPCuzlpgvoL1L35M45ugGOFH&ystart={num2}&yend={num3}&allnums=&txtJBXXSQL=&txtEntireCount=&txtType=&txtPageSize=20",
            Cookie = cookieStr,
            Accept = "image/jpeg, image/gif, image/pjpeg, application/x-ms-application, application/xaml+xml, application/x-ms-xbap, *",
            Referer = "http://" + this.host + "/kssjwpt/MasterPage/JBXX_NEW.aspx?Id=&JSH=&XM=&XB=&BM=&ZJH=&RSXZ=&NL_ST=&NL_ED=&ZZ=&BAHJ=&BADW=&CSRQ_ST=&CSRQ_ED=&SYDW=&RSRQ_ST=&RSRQ_ED=&CSSJ_ST=&CSSJ_ED=&HJD=&AY=&CSYY=&DAWZ=&DWLX=&Faint=Yes&ZSZT=1&type=Ser",
            UserAgent = "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)",
            ContentType = "application/x-www-form-urlencoded",
            Host = this.host,
            KeepAlive = true
        };
        item.Header.Add("Accept-Language", "zh-CN");
        item.Header.Add("Accept-Encoding", "gzip, deflate");
        item.Header.Add("Pragma", "no-cache");
        return helper.GetHtml(item).Html;
    }
 楼主| 发表于 2019-8-19 10:30:00 | 显示全部楼层
站长可否帮忙解决下,可以付费,客户比较急
发表于 2019-8-19 14:29:13 | 显示全部楼层
咋解决,没包,没链接的,你好歹发个链接让大家看看
 楼主| 发表于 2019-8-22 22:22:02 | 显示全部楼层
已经解决了,我这个是内网不好发链接出来
您需要登录后才可以回帖 登录 | 马上注册

本版积分规则

QQ|手机版|小黑屋|手机版|联系我们|关于我们|广告合作|苏飞论坛 ( 豫ICP备18043678号-2)

GMT+8, 2024-12-25 16:19

© 2014-2021

快速回复 返回顶部 返回列表