pierre_cours/librairyawww

There is no license information available for the latest version (1.0.0) of this package.

1.0.0 2023-07-04 07:13 UTC

This package is not auto-updated.

Last update: 2024-05-08 09:38:35 UTC


README

Instalation

composer require pierre_cours/librairyawww 
composer i 

Local Environment

vendor/bin/phpstan analyse src --level=max 
vendor/bin/php-cs-fixer fix src --rules=@PSR12 
vendor/bin/phpunit tests 

How it works

In the Api.php file you fetch the url line 18(awwwards), then you get the html Content of the website. From the html you got, you use a filter to find all the elements that has the class "card-site".It return two things which are the text which can either exist or not, to avoid a bug I set a default value of "undefined". The second thing it return is a second filter to get the tags like HM(Honorable Mention) or SOTD(Site Of The Day), it make a second crawl that return an array and in this array Ifound the tags with the class "has-tooltip".