This commit is contained in:
2023-11-24 20:49:19 +08:00
parent ca5219cb93
commit be14f5fdb1
65 changed files with 1991 additions and 2214 deletions

View File

@@ -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;