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

苏飞论坛

 找回密码
 马上注册

QQ登录

只需一步,快速开始

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

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

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

查看: 3298|回复: 3

[HttpHelper] 模拟QQ登录第三方网站最后一步出问题

[复制链接]
发表于 2017-3-14 15:36:11 | 显示全部楼层 |阅读模式
现在很多网站都支持QQ登录,在模拟登录过程中组后一步授权总出问题,在这个请求前面的都成功了。来到这里不成功。如果成功location应该是跳转网站的授权接口

HttpHelper http = new HttpHelper();
            HttpItem item = new HttpItem()
            {

                URL = "https://graph.qq.com/oauth2.0/authorize",
                Host = "graph.qq.com",
                Method = "POST",
                Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
                Referer = "https://graph.qq.com/oauth/show?which=ConfirmPage&display=pc&response_type=code&client_id=100253636&redirect_uri=http%3a%2f%2fwww.quanmama.com%2ft%2fqq.aspx%3freturl%3dhttp%253a%252f%252fwww.quanmama.com%252ft%252flogin_jump.htm%253faj_is_from_login%253d1%2526from%253dhttp%253a%252f%252fwww.quanmama.com%252fquan%252f1930570.html&state="+state,
                UserAgent = "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.104 Safari/537.36 Core/1.53.2372.400 QQBrowser/9.5.10548.400",
                Cookie = ck2,
                KeepAlive = true,
                Expect100Continue=true,
                ContentType = "application/x-www-form-urlencoded",

                Postdata = "response_type=code&client_id=100253636&redirect_uri=http%3A%2F%2Fwww.quanmama.com%2Ft%2Fqq.aspx%3Freturl%3Dhttp%253a%252f%252fwww.quanmama.com%252ft%252flogin_jump.htm%253faj_is_from_login%253d1%2526from%253dhttp%253a%252f%252fwww.quanmama.com%252fquan%252f1930570.html&scope=&state=" + state + "&src=1&update_auth=1&openapi=80901010&g_tk=" + result1 + "&auth_time=" + GetTime() + "&ui=1988D39C-5E36-43CE-B9D1-1BD516726213",

            };
            item.Header.Add("Cache-Control", "max-age=0");
            item.Header.Add("Origin", "https://graph.qq.com");
            item.Header.Add("Accept-Encoding", "gzip, deflate, br");
            item.Header.Add("Accept-Language", "zh-CN,zh;q=0.8");




大牛有研究的吗。欢迎指教


1. 开通SVIP会员,免费下载本站所有源码,不限次数据,不限时间
2. 加官方QQ群,加官方微信群获取更多资源和帮助
3. 找站长苏飞做网站、商城、CRM、小程序、App、爬虫相关、项目外包等点这里
发表于 2017-3-14 16:33:59 | 显示全部楼层
QQ登录不是有接口吗?直接调用就行了吧
 楼主| 发表于 2017-3-14 19:39:57 | 显示全部楼层
站长苏飞 发表于 2017-3-14 16:33
QQ登录不是有接口吗?直接调用就行了吧

模拟登录第三方网站?第三方网站用QQ登录
 楼主| 发表于 2017-3-16 16:22:39 | 显示全部楼层
进来看看。经常用得到
您需要登录后才可以回帖 登录 | 马上注册

本版积分规则

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

GMT+8, 2024-4-20 07:31

© 2014-2021

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