try
{
if (isStopGetInfoGroup)
{
taskQueue.ShutDown();
return;
}
if (string.IsNullOrEmpty(uidgroup)) break;
string temp = request.GraphToken("client_doc_id=32552914521362327348182819972&variables={\"image_low_width\":407,\"image_large_aspect_width\":1220,\"image_medium_height\":2048,\"group_composer_render_location\":\"group_mall\",\"cover_photo_width\":1220,\"media_type\":\"image/jpeg\",\"top_promo_nux_id\":\"7383\",\"image_medium_width\":610,\"should_fetch_welcome_post_data\":true,\"is_product_tagging_enabled_in_groups\":true,\"group_id\":\""+ uidgroup + "\",\"image_low_height\":2048,\"profile_pic_media_type\":\"image/x-auto\",\"should_fetch_group_anonymous_post_info\":false,\"default_image_scale\":3,\"cover_photo_height\":639,\"image_large_aspect_height\":638,\"image_high_height\":2048,\"remove_unused_graphql_fields_group_composer_traits\":false,\"image_high_width\":1220,\"size_style\":\"contain-fit\",\"scale\":\"3\",\"nt_context\":{\"using_white_navbar\":true,\"pixel_ratio\":3,\"is_push_on\":true,\"styles_id\":\"1610d0f6c47062027525f7606f43033e\",\"bloks_version\":\"409d75d733b1f96c9b0ee58169e95c2b7dcbf3976aa59bace496083d62e6a9d2\"},\"should_use_top_of_home_server_control\":true,\"action_source\":\"GROUP_MALL\",\"action_intervention_source\":\"GROUP_MALL\",\"should_show_pinned_topic_plink_nux\":true,\"should_fetch_action_intervention\":true,\"should_fetch_group_join_chaining_bottom_sheet\":true,\"should_fetch_new_member_greeting\":true,\"cover_image_navbar_size\":96,\"should_defer_rooms_creation_nt_action\":true}").Result;
if (temp.IsContains("828281030927956"))
{
job.pro.Status = "CP 956";
job.pro.Live = "CP 956";
return;
}
if (temp.IsContains("1501092823525282"))
{
job.pro.Status = "CP 282";
job.pro.Live = "CP 282";
return;
}
string name = RegexMatch(temp, uidgroup + "\",\"name\":\"(.*?)\"").Groups[1].Value;
if (temp.IsContains("{\"data\":{\"group\":null}"))
{
n++;
//trường hợp sai id group hoặc bị chặn
}
else if (!string.IsNullOrEmpty(name))
{
n = 0;
name = RegexUnescape(name);
string member = RegexMatch(temp, "group_cover_member_profiles\":{\"count\":(\\d+)").Groups[1].Value;
decimal num = decimal.Parse(member);
string type = RegexMatch(temp, "\"icon_name\":\"(.*?)\"").Groups[1].Value;
if (!string.IsNullOrEmpty(type))
{
if (type.Equals("globe-americas")) type = "Public";
else if (type.Equals("privacy")) type = "Privacy";
}
string join_state = RegexMatch(temp, "viewer_join_state\":\"(.*?)\"").Groups[1].Value;
string contenttype = "";
if (temp.IsContains("\"pending_post_submitted_content\":null")) contenttype = "Không Kiểm Duyệt";
else if (temp.IsContains("\"pending_post_submitted_content\":{\"title\":\"")) contenttype = "Có Kiểm Duyệt";
else contenttype = "Không Xác Định";
this.Dispatcher.Invoke(() =>
{
datagrid_GetInfoGroup.Items.Add(new { ID = datagrid_GetInfoGroup.Items.Count + 1, UID = job.pro.UID, GroupID = uidgroup, Name = name, Count = num, Member = member, Type = type, Join = join_state, PostStatus = contenttype });
});
}
if (delay > 0) Task.Delay(rdmain.Next(delay * 1000, (delay + 5) * 1000)).Wait();
uidgroup = listUID.Dequeue();
}
catch { n++; }