sync
This commit is contained in:
@@ -7,16 +7,12 @@
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\Str;
|
||||
use Intervention\Image\Facades\Image;
|
||||
use Symfony\Component\DomCrawler\Crawler;
|
||||
use Masterminds\HTML5;
|
||||
|
||||
|
||||
class SaveShopeeSellerImagesTask
|
||||
{
|
||||
public static function handle($shopee_task)
|
||||
{
|
||||
|
||||
|
||||
$unblocker_proxy_server = get_smartproxy_unblocker_server();
|
||||
$rotating_proxy_server = get_smartproxy_rotating_server();
|
||||
$costs = [];
|
||||
@@ -174,9 +170,8 @@ private static function getFilteredImages(string $raw_html, string $proxy, strin
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($height > $width)
|
||||
{
|
||||
continue;
|
||||
if ($height > $width) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$interventionImage->resize(800, null, function ($constraint) {
|
||||
@@ -257,9 +252,8 @@ private static function getFilteredImages(string $raw_html, string $proxy, strin
|
||||
|
||||
$final_images = [];
|
||||
|
||||
foreach ($filteredImages as $image_obj)
|
||||
{
|
||||
$final_images[] = (object) $image_obj;
|
||||
foreach ($filteredImages as $image_obj) {
|
||||
$final_images[] = (object) $image_obj;
|
||||
}
|
||||
|
||||
return $final_images;
|
||||
|
||||
Reference in New Issue
Block a user