temu客户端程序
This commit is contained in:
commit
4aaf264e89
694 files changed
+263780
No files matched your search
@@ -0,0 +1,60 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using AllBase;
|
||||
using Work.ManageClass;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Work.Api
|
||||
{
|
||||
public class GetShopLoginInfo
|
||||
{
|
||||
public string Name;
|
||||
public GetShopLoginInfo(string name)
|
||||
{
|
||||
Name = name;
|
||||
}
|
||||
|
||||
public static List<string> ShopCat = new List<string>();
|
||||
public static List<string> ShopCatTemp = new List<string>();
|
||||
public static List<ShopChatBase> Shops = new List<ShopChatBase>();
|
||||
public static List<ShopChatBase> ShopBak = new List<ShopChatBase>();
|
||||
public static List<ShopChatBase> ShopTemp = new List<ShopChatBase>();
|
||||
|
||||
private Dictionary<string, string> GetCookies(ShopInfo SpIn)
|
||||
{
|
||||
int AgainCount = 0;
|
||||
Dictionary<string, string> dicCookie = new Dictionary<string, string>();
|
||||
string NewUrl = BaseClass.BuildObjString("pdd_shop_tempx&act=get_shop_cookies_list");
|
||||
Again:
|
||||
string Newhtml = GetHtml.PostUtf8(NewUrl, UserLogin.GetSignaturex("", "") + "&shops=" + GetHtml.UrlEncodeUtf8(Newtonsoft.Json.JsonConvert.SerializeObject(SpIn)));
|
||||
if (string.IsNullOrEmpty(Newhtml) || Newhtml.Contains("Error No File"))
|
||||
{
|
||||
if (AgainCount < 2)
|
||||
{
|
||||
AgainCount++;
|
||||
Thread.Sleep(50);
|
||||
goto Again;
|
||||
}
|
||||
}
|
||||
var m = BaseRegex.GetMatchRegex(ref Newhtml, @"<shop name=""([^""]+?)"">([\w\W]+?)</shop>");
|
||||
for (int j = 0; m != null && j < m.Count; j++)
|
||||
{
|
||||
string shopName = m[j].Groups[1].Value;
|
||||
string json = m[j].Groups[2].Value;
|
||||
|
||||
if (!string.IsNullOrEmpty(json) && !json.Contains("{}") && !json.Contains("none") && !json.Contains("noney"))
|
||||
{
|
||||
if (!dicCookie.ContainsKey(shopName))
|
||||
{
|
||||
dicCookie.Add(shopName, json);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return dicCookie;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user