Files
KJD/Work/Api/DeleteRejectProduct.cs
T
2025-06-29 19:38:31 +08:00

62 lines
2.2 KiB
C#

/*
* 删除已驳回
*
*/
using System.Threading;
using AllBase;
namespace Work.Api
{
public class DeleteRejectProduct
{
public ShopChatBase Shop;
public DeleteRejectProduct(ShopChatBase shop)
{
Shop = shop;
}
public void Get()
{
int al = 1,count =1;
while (true)
{
string url = "https://mms.pinduoduo.com/glide/v2/mms/query/commit/list";
string data = "{\"start\":0,\"length\":15,\"check_status\":3}";
string refere = "https://mms.pinduoduo.com/Pdd.html";
string html = GetPostTaobaoHtml.JsonPinduoduoUpload(url, refere, true, data, Shop.Cookies);
var m = BaseRegex.GetMatchRegex(ref html, @"\{""id"":([\d]+),");
if (m == null || m.Count == 0)
break;
for (int i = 0; i < m.Count; i++)
{
string id = m[i].Groups[1].Value;
url = "https://mms.pinduoduo.com/glide/v2/mms/edit/commit/" + id + "/delete";
html = GetPostTaobaoHtml.JsonPinduoduoUpload(url, refere, true, "{}", Shop.Cookies);
Thread.Sleep(300);
}
}
while (true)
{
string url = "https://mms.pinduoduo.com/glide/v2/mms/query/commit/list";
string data = "{\"start\":0,\"length\":15,\"check_status\":0}";
string refere = "https://mms.pinduoduo.com/Pdd.html";
string html = GetPostTaobaoHtml.JsonPinduoduoUpload(url, refere, true, data, Shop.Cookies);
var m = BaseRegex.GetMatchRegex(ref html, @"\{""id"":([\d]+),");
if (m == null || m.Count == 0)
return;
for (int i = 0; i < m.Count; i++)
{
string id = m[i].Groups[1].Value;
url = "https://mms.pinduoduo.com/glide/v2/mms/edit/commit/" + id + "/delete";
html = GetPostTaobaoHtml.JsonPinduoduoUpload(url, refere, true, "{}", Shop.Cookies);
Thread.Sleep(300);
}
}
}
}
}