中文阿里搜索是个坑....
parent
9fc43f81a5
commit
d37a6ccbf5
|
@ -50,7 +50,6 @@ namespace EnAliKeywordSearch
|
||||||
url = String.Format("http://www.alibaba.com/products/F0/{0}/{1}.html", HttpUtility.UrlEncode(key), i);
|
url = String.Format("http://www.alibaba.com/products/F0/{0}/{1}.html", HttpUtility.UrlEncode(key), i);
|
||||||
else
|
else
|
||||||
url = String.Format("http://s.1688.com/selloffer/offer_search.htm?keywords={0}&beginPage={1}", HttpUtility.UrlEncode(key), i);
|
url = String.Format("http://s.1688.com/selloffer/offer_search.htm?keywords={0}&beginPage={1}", HttpUtility.UrlEncode(key), i);
|
||||||
|
|
||||||
string htmldoc = httpHelper.Get(url);
|
string htmldoc = httpHelper.Get(url);
|
||||||
if (string.IsNullOrEmpty(htmldoc))
|
if (string.IsNullOrEmpty(htmldoc))
|
||||||
{
|
{
|
||||||
|
@ -59,7 +58,8 @@ namespace EnAliKeywordSearch
|
||||||
maybe = true;
|
maybe = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (htmldoc.Contains(HttpUtility.HtmlEncode(cpy)))
|
string encodecpy = HttpUtility.HtmlEncode(cpy);
|
||||||
|
if (htmldoc.Contains(encodecpy))
|
||||||
{
|
{
|
||||||
pageinfo = "第" + i + "页";
|
pageinfo = "第" + i + "页";
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue