模拟登陆淘宝

.Net技术 码拜 9年前 (2015-05-10) 1608次浏览 0个评论
 

模拟登陆淘宝,并获得订单数据
有朋友做过吗?

20分
http://topic.csdn.net/u/20100727/12/4f309b03-96e5-4546-8c4a-b650dc6ee25e.html
谢谢,有没有具体的代码
悬乎。。。
30分
你用wpe工具,然后自己在浏览器中登陆一下,看看抓到的包,然后按照抓包内容,将相应信息添加到请求参数中去
类似下面这个帖子,看其方法就行了,获得返回内容后可以通过正则来取得订单信息,用delphi做过,c#的只能讲这些了
http://topic.csdn.net/u/20101118/21/0e1bb87a-f72d-4390-8e06-234ff9ea4d36.html
15分
淘宝已经提供了官方的SDK下载:

TopSDK

登陆示例:

淘宝帐号快速登录

还没有解决
谁能帮记忙解决啊
我登陆进去了,但跳转其它网页就不行了
10分
自己分析网站http消息可靠点

这种东西, 即使有代码, 网站一更新, 也多半不能用了

15分
淘宝TOP开发
参考淘宝官网
http://open.taobao.com/
http://my.open.taobao.com/apidoc/main.htm
http://my.open.taobao.com/apitools/apiTools.htm
 /// <summary>
        /// 获取待发货商品列表
        /// </summary>
        /// <returns></returns>
        public static DataTable Get_Trades(string ShopName)
        {
            DataTable DT = new DataTable();
            DT.Columns.Add("bianhao", typeof(string));           
            DT.Columns.Add("shuliang", typeof(string));            
            DT.Columns.Add("dianpu", typeof(string));           
            DT.Columns.Add("pay_time", typeof(string));
            DT.Columns.Add("NumIid", typeof(string));

            ITopClient client = TB.Classes.TB_Link.Tb_Link(ShopName);
            //待发货商品列表
            TradesSoldGetRequest req = new TradesSoldGetRequest();
            req.Fields = "tid,orders,title,seller_nick,pay_time";
            req.Status = "WAIT_SELLER_SEND_GOODS";
            for (int i = 1; i < 10; i++)
            {
                //页码
                req.PageNo = i;
                //每页条数
                req.PageSize = 200;
                TradesSoldGetResponse re = client.Execute(req);
                if (re.Trades.Count > 0)
                {
                    for (int y = 0; y < re.Trades.Count; y++)
                    {
                        for (int x = 0; x < re.Trades[y].Orders.Count; x++)
                        {
                            DT.Rows.Add(Classes.Goods.Get_Out_Id(re.Trades[y].Orders[x].NumIid, ShopName), re.Trades[y].Orders[x].Num.ToString(), re.Trades[y].SellerNick, re.Trades[y].PayTime, @"http://item.taobao.com/item.htm?id=" + re.Trades[y].Orders[x].NumIid);                           
                        }
                    }
                }
                else
                    break;
            }
            return DT;
        }

 /// <summary>
        /// 淘宝API连接          /// </summary>
        /// <returns></returns>
        public static ITopClient Tb_Link(string ShopName)
        {
            ITopClient client = new DefaultTopClient("", "", "");
            if (ShopName == "****")
                client = new DefaultTopClient("http://gw.api.taobao.com/router/rest", "你的APPKEY", "你的APP");
                       return client;
        }

CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明模拟登陆淘宝
喜欢 (0)
[1034331897@qq.com]
分享 (0)

文章评论已关闭!