v4.0
This commit is contained in:
parent
02c2f115f9
commit
5f8fcb0a33
30
worker.php
30
worker.php
@ -104,14 +104,36 @@ foreach ($pending_submissions as $sub) {
|
||||
}
|
||||
}
|
||||
|
||||
$industry = null;
|
||||
if ($company) {
|
||||
$industry_query = ""{$company}" industry";
|
||||
$industry_results_json = shell_exec("gemini-tool google_web_search --query '{$industry_query}'");
|
||||
if ($industry_results_json) {
|
||||
$results = json_decode($industry_results_json, true);
|
||||
if (!empty($results['web_search_result']['results'])) {
|
||||
$industry = $results['web_search_result']['results'][0]['title'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$update_data = [
|
||||
$geo_location = null;
|
||||
if ($company) {
|
||||
$location_query = ""{$company}" headquarters location";
|
||||
$location_results_json = shell_exec("gemini-tool google_web_search --query '{$location_query}'");
|
||||
if ($location_results_json) {
|
||||
$results = json_decode($location_results_json, true);
|
||||
if (!empty($results['web_search_result']['results'])) {
|
||||
$geo_location = $results['web_search_result']['results'][0]['title'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$update_data = [
|
||||
'linkedin_url' => $linkedin_url,
|
||||
'twitter_url' => $twitter_url,
|
||||
'company' => $company,
|
||||
'location' => 'Unknown', // Placeholder
|
||||
'industry' => 'Unknown', // Placeholder
|
||||
'geo_location' => 'Unknown', // Placeholder
|
||||
'industry' => $industry,
|
||||
'geo_location' => $geo_location,
|
||||
'status' => 'Completed'
|
||||
];
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user