模拟提交商品,测试最多能传50件左右就会出限制

This commit is contained in:
wule committed 2025-09-15 10:36:48 +08:00
1 parent 6639224771
commit 6509233208
37 files changed
+2576 -450

No files matched your search

@@ -166,7 +166,7 @@ namespace TemuKJD.PDDForms.AdminForms
UserName = shop.UserName,
Notes = shop.Notes,
Cookies = cookies,
AntiContents = new List<string> { sc.AntiContent },
AntiContents = new NaiBa.Util.ConcurrentList<string> { sc.AntiContent },
};
if (string.IsNullOrEmpty(shop.Cookies)) // 有cookie的认为是已登录过的
@@ -179,11 +179,12 @@ namespace TemuKJD.PDDForms.AdminForms
}
else
{
shop.AntiContents = newShop.AntiContents;
var urlAddress = BaseClass.BuildObjString("shop/mdy_anti_content");
var data = UserLogin.GetSignaturex()
+ "&login_name=" + shop.LoginName
+ "&shop_id=" + shop.ShopId
+ "&anti_contents=" + JsonHelper.SerializeObject(shop.AntiContents);
+ "&anti_contents=" + JsonHelper.SerializeObject(newShop.AntiContents);
var result = GetHtml.PostUtf8(urlAddress, data);
}
}
@@ -485,7 +486,7 @@ namespace TemuKJD.PDDForms.AdminForms
cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sb.ToString());
}
int GetAntiContentsTimes = 0;
int GetAntiContentsTimes = 40;
private void RequestHandler_ResourceLoadComplete(object sender, string url, string postData, string responseData, IRequest request)
{
var antiContent = request.Headers.AllKeys.Contains("Anti-Content") ? request.Headers["Anti-Content"] : "";
@@ -493,9 +494,9 @@ namespace TemuKJD.PDDForms.AdminForms
{
GetAntiContentsTimes++;
shop.AntiContents.Add(antiContent);
while (shop.AntiContents.Count > 10)
while (shop.AntiContents.Count > 50)
shop.AntiContents.RemoveAt(0);
if (!string.IsNullOrEmpty(shop.ShopId) && GetAntiContentsTimes > 5)
if (!string.IsNullOrEmpty(shop.ShopId) && GetAntiContentsTimes > 50)
{
GetAntiContentsTimes = 0;
var antis = shop.AntiContents;
@@ -512,7 +513,23 @@ namespace TemuKJD.PDDForms.AdminForms
}
Task.Run(() =>
{
//var data = responseData;
var data = responseData;
if (data.Contains("\"validate_message\""))
{
}
if (data.Contains("out_goods_sn"))
{
}
if (data.Contains("手指涂胶手套") || data.Contains("\\u624b\\u5957"))
{
}
if (data.Contains("劳保手套橡胶手套防护手套工地防护工地手套"))
{
}
//if (data.Contains("supplierId") && data.Contains("\"success\":true"))
//{
// var supplierIds = BaseRegex.GetMatchRegex(ref data, "\"supplierId\":\\d{5,20}");
@@ -561,7 +578,7 @@ namespace TemuKJD.PDDForms.AdminForms
}
if (currentUrl.StartsWith("https://mms.pinduoduo.com/goods/goods_list"))
{
Task.Run(() => {
//Task.Run(() => {
string sAddInputJs = @"
document.addEventListener('wheel', function(event) {
// 检查滚动方向
@@ -596,7 +613,7 @@ namespace TemuKJD.PDDForms.AdminForms
}
}";
cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sAddInputJs);
});
//});
}
}