http://www.sufeinet.com/plugin.php?id=keke_group

苏飞论坛

 找回密码
 马上注册

QQ登录

只需一步,快速开始

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

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

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

12
返回列表 发新帖
楼主: 329616

[HttpHelper] 一个带验证码的网站post老是验证码错误

[复制链接]
 楼主| 发表于 2015-3-24 14:48:25 | 显示全部楼层
站长苏飞 发表于 2015-3-24 13:05
用登录页面的Cookie获取验证码,然后再使用这个Cookie登录,

回复要正确使用http://www.sufeinet.com/th ...

登录成功了谢谢


1. 开通SVIP会员,免费下载本站所有源码,不限次数据,不限时间
2. 加官方QQ群,加官方微信群获取更多资源和帮助
3. 找站长苏飞做网站、商城、CRM、小程序、App、爬虫相关、项目外包等点这里
回复

使用道具 举报

发表于 2015-3-24 15:06:48 | 显示全部楼层
代码传给我看看2011182184QQ
回复

使用道具 举报

 楼主| 发表于 2015-3-24 15:41:46 | 显示全部楼层
我勒个擦 发表于 2015-3-24 15:06
代码传给我看看2011182184QQ

hao
回复

使用道具 举报

发表于 2015-3-24 15:48:47 | 显示全部楼层
肯定是读取验证码图片,没有带上cookie
回复

使用道具 举报

发表于 2015-3-25 16:11:43 | 显示全部楼层
要带你第一次请求登陆页面的cookie,把代码发我一份,我看看
回复

使用道具 举报

 楼主| 发表于 2015-3-25 16:18:38 | 显示全部楼层
hell01234 发表于 2015-3-25 16:11
要带你第一次请求登陆页面的cookie,把代码发我一份,我看看

[C#] 纯文本查看 复制代码
   HttpHelper http = new HttpHelper();
            HttpItem item = new HttpItem() //post
            {
                URL = "http://user.qjy168.com/new/login.php?skipurl=index.php",
                Method = "post",
                Postdata = "username=weilang1&psw=090824&hidaction=login",
                Referer = "user.qjy168.com",
                ContentType = "application/x-www-form-urlencoded",
                
                
               
            };

            HttpResult okpost = http.GetHtml(item);
            string html = okpost.Html;
            string cookie = okpost.Cookie;


     


            item = new HttpItem()
            {
                URL = "http://user.qjy168.com/new/do/vip_add_provide.php",
                Method = "post",
                Postdata = "title=QQ:80310134&protypeid=3411440&sort1=8&sort2=8-3&sort3=8-3-17&sort4=8-3-17-6&kw[]11111111&kw[]=22222222&price=3333&units=444&prod_area=555&csm_area&=666&pay_mode=777&stop_date=360&num=888&pack=999&spec=101010&content=123456789123456789&hidaction=add&proimg[]=2013/11/28/3663466_20131128162826.jpg",
                Referer = "http://user.qjy168.com/new/vip_add_provide.php",
                Host = "user.qjy168.com",
                Accept = "text/html, application/xhtml+xml, */*",
               
                Cookie = cookie,


            };
          
            item.Encoding = Encoding.GetEncoding("gb2312");
            HttpResult ceshi = http.GetHtml(item);

            string html1 = ceshi.Html;
            Console.WriteLine(html1);
回复

使用道具 举报

发表于 2015-4-7 15:38:26 | 显示全部楼层
楼主怎么解决的哦 ,
回复

使用道具 举报

发表于 2016-10-23 19:04:50 | 显示全部楼层
你好 麻烦把代码发我一份看一些 谢谢楼主 我的是908811288@qq.com
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 马上注册

本版积分规则

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

GMT+8, 2024-4-29 14:35

© 2014-2021

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