苏飞论坛

 找回密码
 马上注册

QQ登录

只需一步,快速开始

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

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

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

查看: 13436|回复: 1

[讨论] 万能框架抓取net post 页码后总是返回第一页

[复制链接]
发表于 2022-8-20 12:48:59 | 显示全部楼层 |阅读模式
代码如下:
for (int k = 0; k < dt.Rows.Count;k++ )
                {
                    postdata += dt.Rows[k][1].ToString();
                    string postdata2 = "";
                    for (int i = 1; i < 11; i++)
                    {
                        postdata2 = "__EVENTTARGET:HzPager1 __EVENTARGUMENT: " + i.ToString() + " "+postdata;
                        HttpItem item = new HttpItem()
                        {
                            URL = url,//URL     必需项
                            Method = method,//URL     可选项 默认为Get
                            Timeout = 100000,//连接超时时间     可选项默认为100000
                            ReadWriteTimeout = 30000,//写入Post数据超时时间     可选项默认为30000
                            IsToLower = false,//得到的HTML代码是否转成小写     可选项默认转小写
                            Cookie = "",//字符串Cookie     可选项
                            UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0",//用户的浏览器类型,版本,操作系统     可选项有默认值
                            Accept = "text/html, application/xhtml+xml, */*",//    可选项有默认值
                            ContentType = "text/html",//返回类型    可选项有默认值
                            Referer = url,//来源URL     可选项
                            Allowautoredirect = false,//是否根据301跳转     可选项
                            AutoRedirectCookie = false,//是否自动处理Cookie     可选项
                            //CerPath = "d:\123.cer",//证书绝对路径     可选项不需要证书时可以不写这个参数
                            //Connectionlimit = 1024,//最大连接数     可选项 默认为1024
                            Postdata = postdata2,//Post数据     可选项GET时不需要写
                            //ProxyIp = "192.168.1.105:2020",//代理服务器ID     可选项 不需要代理 时可以不设置这三个参数
                            //ProxyPwd = "123456",//代理服务器密码     可选项
                            //ProxyUserName = "administrator",//代理服务器账户名     可选项
                            ResultType = ResultType.String,//返回数据类型,是Byte还是String
                        };
                        result = http.GetHtml(item);
                        string html = result.Html;
                        string cookie = result.Cookie;
求楼主大大帮忙指点
weibo.com/ttarticle/p/show?id=2309404804215896932452
weibo.com/ttarticle/p/show?id=2309404804215938875942
weibo.com/ttarticle/p/show?id=2309404804215980818791
weibo.com/ttarticle/p/show?id=2309404804216018568180
weibo.com/ttarticle/p/show?id=2309404804216060248175
weibo.com/ttarticle/p/show?id=2309404804216097997215
weibo.com/ttarticle/p/show?id=2309404804216140202175
weibo.com/ttarticle/p/show?id=2309404804216177951206
weibo.com/ttarticle/p/show?id=2309404804216228282700
weibo.com/ttarticle/p/show?id=2309404804216303780972
weibo.com/ttarticle/p/show?id=2309404804216349917729
weibo.com/ttarticle/p/show?id=2309404804216404444134
weibo.com/ttarticle/p/show?id=2309404804216442192255
weibo.com/ttarticle/p/show?id=2309404804216479940917
weibo.com/ttarticle/p/show?id=2309404804216521883820
weibo.com/ttarticle/p/show?id=2309404804216559370475
weibo.com/ttarticle/p/show?id=2309404804216597381204
weibo.com/ttarticle/p/show?id=2309404804216630936250
weibo.com/ttarticle/p/show?id=2309404804216668422195
weibo.com/ttarticle/p/show?id=2309404804216702239201
weibo.com/ttarticle/p/show?id=2309404804216744182174
weibo.com/ttarticle/p/show?id=2309404804216870011404
weibo.com/ttarticle/p/show?id=2309404804216903303695
weibo.com/ttarticle/p/show?id=2309404804216941314910
weibo.com/ttarticle/p/show?id=2309404804216978800909
weibo.com/ttarticle/p/show?id=2309404804217016811655
weibo.com/ttarticle/p/show?id=2309404804217079726135
weibo.com/ttarticle/p/show?id=2309404804217117474986
weibo.com/ttarticle/p/show?id=2309404804217154961451
weibo.com/ttarticle/p/show?id=2309404804217192972654
weibo.com/ttarticle/p/show?id=2309404804217230722186
weibo.com/ttarticle/p/show?id=2309404804217272664266
weibo.com/ttarticle/p/show?id=2309404804217348162490
weibo.com/ttarticle/p/show?id=2309404804217394037203
weibo.com/ttarticle/p/show?id=2309404804217432048156
weibo.com/ttarticle/p/show?id=2309404804217469534453
weibo.com/ttarticle/p/show?id=2309404804217503351287
weibo.com/ttarticle/p/show?id=2309404804218186760497
weibo.com/ttarticle/p/show?id=2309404804218581287448
weibo.com/ttarticle/p/show?id=2309404804218618773997
weibo.com/ttarticle/p/show?id=2309404804218656522307
weibo.com/ttarticle/p/show?id=2309404804218690339250
weibo.com/ttarticle/p/show?id=2309404804218728087646
weibo.com/ttarticle/p/show?id=2309404804218761380113
weibo.com/ttarticle/p/show?id=2309404804218795197372
weibo.com/ttarticle/p/show?id=2309404804218828751866
weibo.com/ttarticle/p/show?id=2309404804218862305805
weibo.com/ttarticle/p/show?id=2309404804218900054435
weibo.com/ttarticle/p/show?id=2309404804218933346783
weibo.com/ttarticle/p/show?id=2309404804218971357277
weibo.com/ttarticle/p/show?id=2309404804219004912516
weibo.com/ttarticle/p/show?id=2309404804219051049658
weibo.com/ttarticle/p/show?id=2309404804219084603827
weibo.com/ttarticle/p/show?id=2309404804219122352225
weibo.com/ttarticle/p/show?id=2309404804219155907296
weibo.com/ttarticle/p/show?id=2309404804219189199333
weibo.com/ttarticle/p/show?id=2309404804219226947759
weibo.com/ttarticle/p/show?id=2309404804219617280804
weibo.com/ttarticle/p/show?id=2309404804219663417998
weibo.com/ttarticle/p/show?id=2309404804219696972578
weibo.com/ttarticle/p/show?id=2309404804219730527364
weibo.com/ttarticle/p/show?id=2309404804219768275852
weibo.com/ttarticle/p/show?id=2309404804219806024422
weibo.com/ttarticle/p/show?id=2309404804219843772479
weibo.com/ttarticle/p/show?id=2309404804219877327017
weibo.com/ttarticle/p/show?id=2309404804219931591185
weibo.com/ttarticle/p/show?id=2309404804219973795850
weibo.com/ttarticle/p/show?id=2309404804220007350814
weibo.com/ttarticle/p/show?id=2309404804220040643119
weibo.com/ttarticle/p/show?id=2309404804220078391567
weibo.com/ttarticle/p/show?id=2309404804220112208668
weibo.com/ttarticle/p/show?id=2309404804220145500659
weibo.com/ttarticle/p/show?id=2309404804220183511211
weibo.com/ttarticle/p/show?id=2309404804220216803743
weibo.com/ttarticle/p/show?id=2309404804220259008776
weibo.com/ttarticle/p/show?id=2309404804220292563210
weibo.com/ttarticle/p/show?id=2309404804220326117654
weibo.com/ttarticle/p/show?id=2309404804220359672860
weibo.com/ttarticle/p/show?id=2309404804220728770915
weibo.com/ttarticle/p/show?id=2309404804220766519612
weibo.com/ttarticle/p/show?id=2309404804220800074258
weibo.com/ttarticle/p/show?id=2309404804220833629052
weibo.com/ttarticle/p/show?id=2309404804220871114929
weibo.com/ttarticle/p/show?id=2309404804220904932178
weibo.com/ttarticle/p/show?id=2309404804220942680076
weibo.com/ttarticle/p/show?id=2309404804220976234509
weibo.com/ttarticle/p/show?id=2309404804221009790006
weibo.com/ttarticle/p/show?id=2309404804221047538586
weibo.com/ttarticle/p/show?id=2309404804221085024377
weibo.com/ttarticle/p/show?id=2309404804221118578991
weibo.com/ttarticle/p/show?id=2309404804221164716229
weibo.com/ttarticle/p/show?id=2309404804221198533494
weibo.com/ttarticle/p/show?id=2309404804221236281561
weibo.com/ttarticle/p/show?id=2309404804221269836069
weibo.com/ttarticle/p/show?id=2309404804221303390569
weibo.com/ttarticle/p/show?id=2309404804221336945123
weibo.com/ttarticle/p/show?id=2309404804221374693512
weibo.com/ttarticle/p/show?id=2309404804228634771573
weibo.com/ttarticle/p/show?id=2309404804228668588307
weibo.com/ttarticle/p/show?id=2309404804228702143292




1. 开通SVIP会员,免费下载本站所有源码,不限次数据,不限时间
2. 加官方QQ群,加官方微信群获取更多资源和帮助
3. 找站长苏飞做网站、商城、CRM、小程序、App、爬虫相关、项目外包等点这里
发表于 2022-8-22 10:15:44 | 显示全部楼层
应该是提交的包无效,或者缺少其他验证吧,我看你页码用的是视图变量,正常提交有包可以抓下来看看,一般不会起这样的名字, 是不是能错了。
HzPager1 __EVENTARGUMENT
您需要登录后才可以回帖 登录 | 马上注册

本版积分规则

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

GMT+8, 2024-12-25 02:41

© 2014-2021

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