验证淘宝店铺真实性的几个方案

http://open.taobao.com/doc2/apiDetail.htm?spm=a219a.7629065.0.0.TrX4Af&apiId=68

1. 传入 店铺名称 或者 旺旺昵称 即可验证店铺是否真是存在;

2. 通过店铺url,例如海澜之家旗舰店网址 https://heilanhome.tmall.com/,获得源码中的user_nick值,这个值已做了js的encodeURI(),再通过 Microsoft.JScript.GlobalObject.decodeURI()得到旺旺昵称,再通过昵称查询店铺信息。

1             string url = "https://heilanhome.tmall.com/";
2             WebClient client = new WebClient();
3             string html = client.DownloadString(url);
4             var m = Regex.Match(html, "\"user_nick\": \"(?<usernick>[A-Za-z0-9%]+)\",");
5             string usernick = m.Groups["usernick"].ToString();
6             usernick = Microsoft.JScript.GlobalObject.decodeURI(usernick);    

 

posted @ 2016-04-20 11:51  IT高薪猎头  阅读(657)  评论(0编辑  收藏  举报