Add (ai gen)
This commit is contained in:
@@ -64,6 +64,7 @@ public static function handle(string $url, $directory, $postfix = null, $strip_h
|
||||
->get($cached_url);
|
||||
|
||||
if ($response->successful()) {
|
||||
//$costs['html_proxy'] = calculate_smartproxy_cost()
|
||||
$raw_html = $response->body();
|
||||
// ... your logic here ...
|
||||
} else {
|
||||
@@ -274,7 +275,7 @@ private static function filterImages(array $images, string $proxy, string $user_
|
||||
];
|
||||
$image['color_counts'] = self::isMostlyTextBasedOnUniqueColors($interventionImage);
|
||||
//$image['img'] = $interventionImage;
|
||||
$costs['count-'.$count] = calculate_smartproxy_cost($sizeKb);
|
||||
$costs['count-'.$count] = calculate_smartproxy_cost($sizeKb, 'rotating_global');
|
||||
|
||||
$filteredImages[] = $image;
|
||||
|
||||
@@ -357,7 +358,7 @@ private static function getProductImage(array $jsonLdData, string $proxy, string
|
||||
$sizeInKb = strlen($interventionImage->encode()) / 1024; // Convert bytes to kilobytes
|
||||
|
||||
// Calculate the cost
|
||||
$cost = calculate_smartproxy_cost($sizeInKb);
|
||||
$cost = calculate_smartproxy_cost($sizeInKb, 'rotating_global');
|
||||
|
||||
$costs['product_image'] = $cost;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user