调整备货逻辑不允许品质分过低的商品自动备货(完成但尚未测试) 注释无用的相关接口(原小奶狗,小奶兔)
This commit is contained in:
1 parent
fceead357f
commit
8445ec1828
19 files changed
+865
-540
No files matched your search
@@ -22,58 +22,58 @@ namespace Work.CollectClass
|
||||
/// </summary>
|
||||
public void Get()
|
||||
{
|
||||
string url = BaseClass.LoginApiUrl + "taobao/筛选词.txt";
|
||||
string path = "temp/notitleword.tjm";
|
||||
string html;
|
||||
if (FileBase.Exists(path))
|
||||
html = FileBase.ReadAllText(path, Encoding.Default);
|
||||
else
|
||||
{
|
||||
html = GetHtml.Utf8(url);
|
||||
FileBase.WriteAllText(path, html, Encoding.Default);
|
||||
}
|
||||
if (string.IsNullOrEmpty(html))
|
||||
{
|
||||
LogSave.Add("链接云数据库失败");
|
||||
return;
|
||||
}
|
||||
string[] l = html.Split('\n');
|
||||
for (int i = 0; i < l.Length; i++)
|
||||
{
|
||||
string s = l[i].Trim();
|
||||
if (string.IsNullOrEmpty(s) || s.Length < 2)
|
||||
continue;
|
||||
string num = BaseRegex.GetMatchRegexString(ref s, @"([\d]+)");
|
||||
if (!string.IsNullOrEmpty(num) && num.Length == s.Length)
|
||||
continue;
|
||||
NoTitleWord.Add(s);
|
||||
}
|
||||
//string url = BaseClass.LoginApiUrl + "taobao/筛选词.txt";
|
||||
//string path = "temp/notitleword.tjm";
|
||||
//string html;
|
||||
//if (FileBase.Exists(path))
|
||||
// html = FileBase.ReadAllText(path, Encoding.Default);
|
||||
//else
|
||||
//{
|
||||
// html = GetHtml.Utf8(url);
|
||||
// FileBase.WriteAllText(path, html, Encoding.Default);
|
||||
//}
|
||||
//if (string.IsNullOrEmpty(html))
|
||||
//{
|
||||
// LogSave.Add("链接云数据库失败");
|
||||
// return;
|
||||
//}
|
||||
//string[] l = html.Split('\n');
|
||||
//for (int i = 0; i < l.Length; i++)
|
||||
//{
|
||||
// string s = l[i].Trim();
|
||||
// if (string.IsNullOrEmpty(s) || s.Length < 2)
|
||||
// continue;
|
||||
// string num = BaseRegex.GetMatchRegexString(ref s, @"([\d]+)");
|
||||
// if (!string.IsNullOrEmpty(num) && num.Length == s.Length)
|
||||
// continue;
|
||||
// NoTitleWord.Add(s);
|
||||
//}
|
||||
|
||||
url = BaseClass.LoginApiUrl + "taobao/品牌词.txt";
|
||||
path = "temp/nobrand.tjm";
|
||||
if (FileBase.Exists(path))
|
||||
html = FileBase.ReadAllText(path, Encoding.Default);
|
||||
else
|
||||
{
|
||||
html = GetHtml.Utf8(url);
|
||||
FileBase.WriteAllText(path, html, Encoding.Default);
|
||||
}
|
||||
if (string.IsNullOrEmpty(html))
|
||||
{
|
||||
LogSave.Add("链接云数据库失败");
|
||||
return;
|
||||
}
|
||||
l = html.Split('\n');
|
||||
for (int i = 0; i < l.Length; i++)
|
||||
{
|
||||
string s = l[i].Trim();
|
||||
if (string.IsNullOrEmpty(s) || s.Length < 2)
|
||||
continue;
|
||||
string num = BaseRegex.GetMatchRegexString(ref s, @"([\d]+)");
|
||||
if (!string.IsNullOrEmpty(num) && num.Length == s.Length)
|
||||
continue;
|
||||
NoBrand.Add(s);
|
||||
}
|
||||
//url = BaseClass.LoginApiUrl + "taobao/品牌词.txt";
|
||||
//path = "temp/nobrand.tjm";
|
||||
//if (FileBase.Exists(path))
|
||||
// html = FileBase.ReadAllText(path, Encoding.Default);
|
||||
//else
|
||||
//{
|
||||
// html = GetHtml.Utf8(url);
|
||||
// FileBase.WriteAllText(path, html, Encoding.Default);
|
||||
//}
|
||||
//if (string.IsNullOrEmpty(html))
|
||||
//{
|
||||
// LogSave.Add("链接云数据库失败");
|
||||
// return;
|
||||
//}
|
||||
//l = html.Split('\n');
|
||||
//for (int i = 0; i < l.Length; i++)
|
||||
//{
|
||||
// string s = l[i].Trim();
|
||||
// if (string.IsNullOrEmpty(s) || s.Length < 2)
|
||||
// continue;
|
||||
// string num = BaseRegex.GetMatchRegexString(ref s, @"([\d]+)");
|
||||
// if (!string.IsNullOrEmpty(num) && num.Length == s.Length)
|
||||
// continue;
|
||||
// NoBrand.Add(s);
|
||||
//}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2112,18 +2112,18 @@ namespace Work.CollectClass
|
||||
|
||||
public static void GetServerCookies()
|
||||
{
|
||||
string url = BaseClass.LoginApiUrl + "?obj=upshopid/user_cookies";
|
||||
string html = GetHtml.PostUtf8(url, "act=get_rand");
|
||||
if (string.IsNullOrEmpty(html))
|
||||
html = GetHtml.PostUtf8(url, "act=get_rand");
|
||||
var m = BaseRegex.GetMatchRegex(ref html, "<user([^>]+?>)");
|
||||
for (int i = 0; m != null && i < m.Count; i++)
|
||||
{
|
||||
string list = m[i].Groups[0].Value;
|
||||
string mobile = BaseRegex.GetStringJson(ref list, "mobile");
|
||||
string cookies = BaseRegex.GetStringJson(ref list, "cookies");
|
||||
Mobiles.Add(new KeyValueBase(mobile, cookies));
|
||||
}
|
||||
//string url = BaseClass.LoginApiUrl + "?obj=upshopid/user_cookies";
|
||||
//string html = GetHtml.PostUtf8(url, "act=get_rand");
|
||||
//if (string.IsNullOrEmpty(html))
|
||||
// html = GetHtml.PostUtf8(url, "act=get_rand");
|
||||
//var m = BaseRegex.GetMatchRegex(ref html, "<user([^>]+?>)");
|
||||
//for (int i = 0; m != null && i < m.Count; i++)
|
||||
//{
|
||||
// string list = m[i].Groups[0].Value;
|
||||
// string mobile = BaseRegex.GetStringJson(ref list, "mobile");
|
||||
// string cookies = BaseRegex.GetStringJson(ref list, "cookies");
|
||||
// Mobiles.Add(new KeyValueBase(mobile, cookies));
|
||||
//}
|
||||
}
|
||||
|
||||
public static string GetRandomPDDAccessToken(Func<PinDuoDuoTokenInfo, bool> predicateToken)
|
||||
|
||||
Reference in new issue
Block a user