This commit is contained in:
Flatlogic Bot 2025-10-19 03:39:11 +00:00
parent 02c2f115f9
commit 5f8fcb0a33

View File

@ -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, 'linkedin_url' => $linkedin_url,
'twitter_url' => $twitter_url, 'twitter_url' => $twitter_url,
'company' => $company, 'company' => $company,
'location' => 'Unknown', // Placeholder 'industry' => $industry,
'industry' => 'Unknown', // Placeholder 'geo_location' => $geo_location,
'geo_location' => 'Unknown', // Placeholder
'status' => 'Completed' 'status' => 'Completed'
]; ];