Aliexpress Crawler
Usage
Get the item crawler by calling, (*1)
$crawler = new \Chougron\AliexpressCrawler\Crawler();
$item = $crawler->crawlItem($itemUrl);
Available methods for the item crawler
getId() : string
Returns the ID of the item, (*2)
getUrl() : string
Returns the canonical URL of the item, (*3)
getGalleryImages() : string[]
Returns an array containing the gallery images of the item, (*4)
getName() : string
Returns the name of the item, (*5)
getShopName() : string
Returns the name of the shop selling the item, (*6)
getShopUrl() : string
Returns the URL of the shop selling the item, (*7)
getDescription() : string
Returns the description of the item, (*8)
getCost() : string
Returns the cost of the item, (*9)
getMaxCost() : string
Returns the maximum cost of the item, (*10)
getType() : string
Returns the type of the item. simple if there is no variation or configurable if there are some., (*11)
getSkus() : Sku[]
Returns an array containing the different Skus of the item. If the item is a simple item, the array will have only one element., (*12)
getSkuImage(Sku $sku) : string
Returns the image identifying the given Sku., (*13)
The Sku Object
The Sku Object correspond to the different variations of the item sold on the same page.
It can have a different price, a different quantity of inventory, and a different image., (*14)
Available variables for the Sku object
id : string
The ID of the item Sku, (*15)
price : string
The price of the Sku, (*16)
quantity : string
The quantity remaining for the Sku, (*17)
Tests
To launch the tests, you need to install the vendors with composer, and then you can use the following command :, (*18)
./vendor/bin/phpunit --bootstrap vendor/autoload.php tests/