Download the PHP package zrashwani/news-scrapper without Composer

On this page you can find all versions of the php package zrashwani/news-scrapper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package news-scrapper

News Scrapper

This library extract article/news information from a webpage including: title, main image, description, author, keywords, publish date and body (if possible)...

This library supports scrapping using standard structured meta data, like: Microdata, hAtom Microformat ..etc, along with custom selectors that can be specified to support unstructured webpages.

News-Scrapper requires PHP >= 5.4

Build Status Code Climate codecov.io SensioLabsInsight Scrutinizer Code Quality

How to Install

You can install this library with Composer. Drop this into your composer.json manifest file:

{
    "require": {
        "zrashwani/news-scrapper": "1.*"
    }
}

Then run composer install.

How to Use

Here's a quick how to scrap news data from a webpage:

By default, scrapper tries to guess the best structured data adapter and apply it.

Scrapping Structured data

You can select a specific adapter to be used for extracting the data as following:

Here is the list of supported structured data adapters or scrapping modes:

Scrapping Unstructured data

If the webpage doesn't follow any standard structured data, you can still scrap news information by specifying xpath or css selector for different article parts like: title, description, image and body. as following:

Custom scrapping adapter CustomAdapter supports method chaining for setting the selectors. If any selector is not specified it will use default selectors based on DefaultAdapter (which is html adapter that depends of standard meta tags).

Scrapping Group of Links

To scrap group of news article from certain page containing news links, scrapLinkGroup method can be used

How to Contribute

  1. Fork this repository
  2. Create a new branch for each feature or improvement
  3. Send a pull request from each feature branch

It is very important to separate new features or improvements into separate feature branches, and to send a pull request for each branch. This allows me to review and pull in new features or improvements individually.

All pull requests must adhere to the PSR-2 standard.

System Requirements

License

MIT Public License


All versions of news-scrapper with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
symfony/console Version ^2.6
fabpot/goutte Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package zrashwani/news-scrapper contains the following files

Loading the files please wait ....