The library is usually installed using composer:
composer require spekulatius/phpscraper
After the installation is completed the package will be picked up by the Composer autoloader. If you are using a VanillaPHP library you will need to include the autoloader in your script:
If you are using a framework such as Laravel, SilverStripe or Flarum, you won't need this step.