|
@@ -25,11 +25,125 @@ class XcJob
|
|
|
return $this;
|
|
return $this;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 获取达人详情信息
|
|
|
|
|
+ * @param string $uid
|
|
|
|
|
+ * @return array
|
|
|
|
|
+ */
|
|
|
|
|
+ public function getStarDetail(string $uid = ""): array
|
|
|
|
|
+ {
|
|
|
|
|
+ $param = [
|
|
|
|
|
+ "o_author_id" => $uid,
|
|
|
|
|
+ "platform_source" => 1,
|
|
|
|
|
+ "platform_channel" => 1,
|
|
|
|
|
+ "recommend" => true,
|
|
|
|
|
+ "need_sec_uid" => true,
|
|
|
|
|
+ "need_linkage_info" => true
|
|
|
|
|
+ ];
|
|
|
|
|
+ $resp = Http::withHeaders($this->header)->asJson()->get("https://www.xingtu.cn/gw/api/author/get_author_base_info",$param)->array();
|
|
|
|
|
+ if (empty($resp['sec_uid'])) return [0,'获取数据失败'];
|
|
|
|
|
+ return [1,$resp];
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 获取达人信息
|
|
|
|
|
+ * {"scene_param":{"platform_source":1,"search_scene":1,"display_scene":1,"marketing_target":1,"task_category":1,"first_industry_id":0,"task_status":3},"search_param":{"keyword":"11_0306","seach_type":2,"is_new_nickname_query":true},"sort_param":{"sort_type":2,"sort_field":{"field_name":"score"}},"page_param":{"page":1,"limit":20},"attribute_filter":[{"field":{"field_name":"price_by_video_type__ge","rel_id":"2"},"field_value":"0"}]}
|
|
|
|
|
+ * @param string $uid
|
|
|
|
|
+ * @return array
|
|
|
|
|
+ */
|
|
|
|
|
+ public function getStarData(string $uid = ""): array
|
|
|
|
|
+ {
|
|
|
|
|
+ $param = [
|
|
|
|
|
+ "scene_param" => [
|
|
|
|
|
+ "platform_source" => 1,
|
|
|
|
|
+ "search_scene" => 1,
|
|
|
|
|
+ "display_scene" => 1,
|
|
|
|
|
+ "marketing_target" => 1,
|
|
|
|
|
+ "task_category" => 1,
|
|
|
|
|
+ "first_industry_id" => 0,
|
|
|
|
|
+ "task_status" => 3
|
|
|
|
|
+ ],
|
|
|
|
|
+ "search_param" => [
|
|
|
|
|
+ "keyword" => $uid,
|
|
|
|
|
+ "seach_type" => 2,
|
|
|
|
|
+ "is_new_nickname_query" => true
|
|
|
|
|
+ ],
|
|
|
|
|
+ "sort_param" => [
|
|
|
|
|
+ "sort_type" => 2,
|
|
|
|
|
+ "sort_field" => [
|
|
|
|
|
+ "field_name" => "score"
|
|
|
|
|
+ ]
|
|
|
|
|
+ ],
|
|
|
|
|
+ "page_param" => [
|
|
|
|
|
+ "page" => 1,
|
|
|
|
|
+ "limit" => 20
|
|
|
|
|
+ ]
|
|
|
|
|
+ ];
|
|
|
|
|
+ $resp = Http::withHeaders($this->header)->asJson()->post("https://www.xingtu.cn/gw/api/gsearch/search_for_author_square",$param)->array();
|
|
|
|
|
+ if ($resp['base_resp']['status_code'] <> 0) return [0,'获取数据失败'];
|
|
|
|
|
+ return [1,['total' => $resp['pagination']['total_count'],'has_more' => $resp['pagination']['has_more'],'list' => $resp['authors']]];
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 获取星川任务列表
|
|
|
|
|
+ * @param int $page
|
|
|
|
|
+ * @param int $size
|
|
|
|
|
+ * @return array
|
|
|
|
|
+ */
|
|
|
|
|
+ public function getTaskList(int $page = 1,int $size = 10): array
|
|
|
|
|
+ {
|
|
|
|
|
+ // {"query":{"task_category_list":[137],"order_status":[],"qc_metrics_time_range_param":{"start_time":"1767628800000","end_time":"1783353599000"}},"page":1,"limit":10}
|
|
|
|
|
+ $param = [
|
|
|
|
|
+ "query" => [
|
|
|
|
|
+ "task_category_list" => [137],
|
|
|
|
|
+ "order_status" => [],
|
|
|
|
|
+ "qc_metrics_time_range_param" => [
|
|
|
|
|
+ "start_time" => strtotime(date("Y-m-d 00:00:00",strtotime("-180 day"))) * 1000,
|
|
|
|
|
+ "end_time" => strtotime(date("Y-m-d 23:59:59")) * 1000,
|
|
|
|
|
+ ]
|
|
|
|
|
+ ],
|
|
|
|
|
+ "page" => $page,
|
|
|
|
|
+ "limit" => $size
|
|
|
|
|
+ ];
|
|
|
|
|
+ $resp = Http::withHeaders($this->header)->asJson()->post("https://www.xingtu.cn/gw/api/task/provider_get_task_order_list",$param)->array();
|
|
|
|
|
+ if ($resp['base_resp']['status_code'] <> 0) return [0,'获取数据失败'];
|
|
|
|
|
+ return [1,['total' => $resp['pagination']['total_count'],'has_more' => $resp['pagination']['has_more'],'page' => $resp['pagination']['page'],'list' => $resp['provider_task_order_list']]];
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 投稿达人
|
|
|
|
|
+ * @param string $jobId
|
|
|
|
|
+ * @param int $page
|
|
|
|
|
+ * @param int $size
|
|
|
|
|
+ * @return array
|
|
|
|
|
+ */
|
|
|
|
|
+ public function getTaskAuthor(string $jobId = "",int $page = 1,int $size = 10): array
|
|
|
|
|
+ {
|
|
|
|
|
+ // {"task_id":"7650432488166899755","qc_metrics_time_range_param":{"start_time":"1767628800000","end_time":"1783353599000"},"page":2,"limit":10,"scene":1}
|
|
|
|
|
+ $param = [
|
|
|
|
|
+ "task_id" => $jobId,
|
|
|
|
|
+ "qc_metrics_time_range_param" => [
|
|
|
|
|
+ "start_time" => strtotime(date("Y-m-d 00:00:00",strtotime("-180 day"))) * 1000,
|
|
|
|
|
+ "end_time" => strtotime(date("Y-m-d 23:59:59")) * 1000,
|
|
|
|
|
+ ],
|
|
|
|
|
+ "page" => $page,
|
|
|
|
|
+ "limit" => $size,
|
|
|
|
|
+ "scene" => 1
|
|
|
|
|
+ ];
|
|
|
|
|
+ $resp = Http::withHeaders($this->header)->post("https://www.xingtu.cn/gw/api/task/provider_get_task_author_performance_list",$param)->array();
|
|
|
|
|
+ if ($resp['base_resp']['status_code'] <> 0) return [0,'获取数据失败'];
|
|
|
|
|
+ if ($resp['pagination']['total_count'] == 0) return [0,'没有数据'];
|
|
|
|
|
+ return [1,['total' => $resp['pagination']['total_count'],'has_more' => $resp['pagination']['has_more'],'page' => $resp['pagination']['page'],'list' => $resp['author_list']]];
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 获取达人投稿视频消耗数据
|
|
* 获取达人投稿视频消耗数据
|
|
|
* https://www.xingtu.cn/gw/api/task/provider_get_star_task_item_list
|
|
* https://www.xingtu.cn/gw/api/task/provider_get_star_task_item_list
|
|
|
* POST
|
|
* POST
|
|
|
* {"page":1,"limit":10,"query":{"provider_confirmed":false,"task_search_key":"7628487095040311348","qc_metrics_time_range_param":{"start_time":"1762963200000","end_time":"1778687999000"}}}
|
|
* {"page":1,"limit":10,"query":{"provider_confirmed":false,"task_search_key":"7628487095040311348","qc_metrics_time_range_param":{"start_time":"1762963200000","end_time":"1778687999000"}}}
|
|
|
|
|
+ * @param string $jobId
|
|
|
|
|
+ * @param int $page
|
|
|
|
|
+ * @param int $size
|
|
|
* @return array
|
|
* @return array
|
|
|
*/
|
|
*/
|
|
|
public function getAuthorVideo(string $jobId = "",int $page = 1,int $size = 10): array
|
|
public function getAuthorVideo(string $jobId = "",int $page = 1,int $size = 10): array
|
|
@@ -46,9 +160,51 @@ class XcJob
|
|
|
]
|
|
]
|
|
|
]
|
|
]
|
|
|
];
|
|
];
|
|
|
- $resp = Http::withHeaders($this->header)->post("https://www.xingtu.cn/gw/api/task/provider_get_star_task_item_list",$param)->array();
|
|
|
|
|
|
|
+ $resp = Http::withHeaders($this->header)->asJson()->post("https://www.xingtu.cn/gw/api/task/provider_get_star_task_item_list",$param)->array();
|
|
|
|
|
+ if ($resp['base_resp']['status_code'] <> 0) return [0,'获取数据失败'];
|
|
|
|
|
+ return [1,['total' => $resp['pagination']['total_count'],'has_more' => $resp['pagination']['has_more'],'page' => $resp['pagination']['page'],'list' => $resp['item_list']]];
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 获取单个任务中指定达人的投稿视频
|
|
|
|
|
+ * @param string $jobId
|
|
|
|
|
+ * @param int $page
|
|
|
|
|
+ * @param int $size
|
|
|
|
|
+ * @return array
|
|
|
|
|
+ */
|
|
|
|
|
+ public function getAuthorVide2Task(string $jobId = "",string $starId = "",int $page = 1,int $size = 10): array
|
|
|
|
|
+ {
|
|
|
|
|
+ $param = [
|
|
|
|
|
+ "page" => $page,
|
|
|
|
|
+ "limit" => $size,
|
|
|
|
|
+ "query" => [
|
|
|
|
|
+ "provider_confirmed" => false,
|
|
|
|
|
+ "task_search_key" => $jobId,
|
|
|
|
|
+ "author_search_key" => $starId,
|
|
|
|
|
+ "qc_metrics_time_range_param" => [
|
|
|
|
|
+ "start_time" => strtotime(date("Y-m-d 00:00:00",strtotime("-180 day"))) * 1000,
|
|
|
|
|
+ "end_time" => strtotime(date("Y-m-d 23:59:59")) * 1000,
|
|
|
|
|
+ ]
|
|
|
|
|
+ ]
|
|
|
|
|
+ ];
|
|
|
|
|
+ $resp = Http::withHeaders($this->header)->asJson()->post("https://www.xingtu.cn/gw/api/task/provider_get_star_task_item_list",$param)->array();
|
|
|
|
|
+ if ($resp['base_resp']['status_code'] <> 0) return [0,'获取数据失败'];
|
|
|
|
|
+ return [1,['total' => $resp['pagination']['total_count'],'has_more' => $resp['pagination']['has_more'],'page' => $resp['pagination']['page'],'list' => $resp['item_list']]];
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 获取视频播放链接
|
|
|
|
|
+ * @param string $videoId
|
|
|
|
|
+ * @return array
|
|
|
|
|
+ */
|
|
|
|
|
+ public function getVideoDetail(string $videoId = ""): array
|
|
|
|
|
+ {
|
|
|
|
|
+ $param = [
|
|
|
|
|
+ "video_id" => $videoId
|
|
|
|
|
+ ];
|
|
|
|
|
+ $resp = Http::withHeaders($this->header)->get("https://www.xingtu.cn/gw/api/ggeneric/get_video_info",$param)->array();
|
|
|
if ($resp['base_resp']['status_code'] <> 0) return [0,'获取数据失败'];
|
|
if ($resp['base_resp']['status_code'] <> 0) return [0,'获取数据失败'];
|
|
|
- return [1,['total' => $resp['pagination']['total_count'],'has_more' => $resp['pagination']['has_more'],'list' => $resp['item_list']]];
|
|
|
|
|
|
|
+ return [1,['cover' => $resp['cover'],'duration' => $resp['duration'],'play_url' => $resp['play_url'],'width' => $resp['width'],'height' => $resp['width']]];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -69,7 +225,7 @@ class XcJob
|
|
|
"event_id" => $jobId,
|
|
"event_id" => $jobId,
|
|
|
"share_type" => 4
|
|
"share_type" => 4
|
|
|
];
|
|
];
|
|
|
- $resp = Http::withHeaders($this->header)->post("https://www.xingtu.cn/gw/api/fe_common_service/share/info",$param)->array();
|
|
|
|
|
|
|
+ $resp = Http::withHeaders($this->header)->asJson()->post("https://www.xingtu.cn/gw/api/fe_common_service/share/info",$param)->array();
|
|
|
if ($resp['base_resp']['status_code'] <> 0) return [0,'生成失败'];
|
|
if ($resp['base_resp']['status_code'] <> 0) return [0,'生成失败'];
|
|
|
return [1,"https://www.xingtu.cn/share/{$resp['share_id']}?hide_nav_bar=1&hide_status_bar=1&should_full_screen=1&utm_source=share_4&session_track_id={$resp['share_id']}"];
|
|
return [1,"https://www.xingtu.cn/share/{$resp['share_id']}?hide_nav_bar=1&hide_status_bar=1&should_full_screen=1&utm_source=share_4&session_track_id={$resp['share_id']}"];
|
|
|
}
|
|
}
|
|
@@ -87,6 +243,6 @@ class XcJob
|
|
|
|
|
|
|
|
protected function getCookie(): string
|
|
protected function getCookie(): string
|
|
|
{
|
|
{
|
|
|
- return "passport_csrf_token=dc2c5075e29c15785b2433afb8d9dd10; passport_csrf_token_default=dc2c5075e29c15785b2433afb8d9dd10; is_staff_user=false; has_biz_token=false; x-web-secsdk-uid=f676fb7e-81a3-42e2-b9e1-73c0ea919aea; csrf_session_id=5499e75e3f1f76a628c1efa81b7c89b3; tt_webid=7637860647254296090; Hm_lvt_5d77c979053345c4bd8db63329f818ec=1778328034; HMACCOUNT=DE9169EBCCD81810; passport_auth_status=93b289d15b8bb4866b32877a48a3b4b6%2C3a1cc997a270fa7b4f4fb3c3a79939fd; passport_auth_status_ss=93b289d15b8bb4866b32877a48a3b4b6%2C3a1cc997a270fa7b4f4fb3c3a79939fd; uid_tt=b918d45f40210fd4799129be8d1e7ae1; uid_tt_ss=b918d45f40210fd4799129be8d1e7ae1; sid_tt=2cf53e24db19ce7e1d9094d82a7e0a15; sessionid=2cf53e24db19ce7e1d9094d82a7e0a15; sessionid_ss=2cf53e24db19ce7e1d9094d82a7e0a15; Hm_lpvt_5d77c979053345c4bd8db63329f818ec=1778501158; sid_guard=2cf53e24db19ce7e1d9094d82a7e0a15%7C1778501177%7C5184000%7CFri%2C+10-Jul-2026+12%3A06%3A17+GMT; session_tlb_tag=sttt%7C14%7CLPU-JNsZzn4dkJTYKn4KFf_________UDv5aLsuhDiFj6DTslfpmqljmlqIjrEWo6QWJ6REal5U%3D; sid_ucp_v1=1.0.0-KDMyOTUxMzAzNDFkZjFjMzBmYzYyNWJjNGU3YTFiYTcwODYyOGJjZjAKFwiUv5Cvv8yyBxC5jIfQBhj6EzgCQPEHGgJscSIgMmNmNTNlMjRkYjE5Y2U3ZTFkOTA5NGQ4MmE3ZTBhMTU; ssid_ucp_v1=1.0.0-KDMyOTUxMzAzNDFkZjFjMzBmYzYyNWJjNGU3YTFiYTcwODYyOGJjZjAKFwiUv5Cvv8yyBxC5jIfQBhj6EzgCQPEHGgJscSIgMmNmNTNlMjRkYjE5Y2U3ZTFkOTA5NGQ4MmE3ZTBhMTU; star_sessionid=485fed1891a1b504a23ee3ce76ccd568";
|
|
|
|
|
|
|
+ return "csrftoken=DiDhfVo0pz9HnEsJ3zGKA39ixm9AxA8t; tt_webid=7637854168573183526; passport_csrf_token=9510b4581fea0015ec5e3293fefb6194; passport_csrf_token_default=9510b4581fea0015ec5e3293fefb6194; is_staff_user=false; has_biz_token=false; s_v_web_id=verify_mqhwxxgj_rimh5qRs_m3VS_4oAv_8yXX_EMfuKVBYkpVW; passport_auth_status=39cd9f76ea3c8ac5c9beab7dfee4825f%2C56147e39ce55d737468b0c00fe003bc2; passport_auth_status_ss=39cd9f76ea3c8ac5c9beab7dfee4825f%2C56147e39ce55d737468b0c00fe003bc2; uid_tt=32a10b0de605d5e5e09080d5531eb77e; uid_tt_ss=32a10b0de605d5e5e09080d5531eb77e; sid_tt=528106ce020f1db0e4ca4ff7895135ef; sessionid=528106ce020f1db0e4ca4ff7895135ef; sessionid_ss=528106ce020f1db0e4ca4ff7895135ef; Hm_lvt_5d77c979053345c4bd8db63329f818ec=1781690725,1782806402; HMACCOUNT=7B24288D273CC431; csrf_session_id=7b04abc1fd6e463b4e7e191681f733da; Hm_lpvt_5d77c979053345c4bd8db63329f818ec=1783489162; sid_guard=528106ce020f1db0e4ca4ff7895135ef%7C1783489186%7C5184000%7CSun%2C+06-Sep-2026+05%3A39%3A46+GMT; session_tlb_tag=sttt%7C16%7CUoEGzgIPHbDkyk_3iVE17_________-2m7Gf0ljknGiOP6NwunArIr0uRP8Cc8jMGlCcp1XhGac%3D; sid_ucp_v1=1.0.0-KDFkMTdlODNhYTQ5NTZkMTg4YWYzZWE0OTA2OTQzOTFiMzc0MjNjNGMKFwiUv5Cvv8yyBxCixbfSBhimDDgCQPEHGgJsZiIgNTI4MTA2Y2UwMjBmMWRiMGU0Y2E0ZmY3ODk1MTM1ZWY; ssid_ucp_v1=1.0.0-KDFkMTdlODNhYTQ5NTZkMTg4YWYzZWE0OTA2OTQzOTFiMzc0MjNjNGMKFwiUv5Cvv8yyBxCixbfSBhimDDgCQPEHGgJsZiIgNTI4MTA2Y2UwMjBmMWRiMGU0Y2E0ZmY3ODk1MTM1ZWY; star_sessionid=85b9f01f4fb6e21eaaeadeb62d7b4b6c";
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|