Skip to content

Commit d4a80f8

Browse files
author
Ivanov Dmitry
committed
A bit changes in documentation.
1 parent 43781ee commit d4a80f8

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
[![Total Downloads][ico-downloads]][link-downloads]
55

66
With this package, you can easily detect main content on different web pages and grab the content from it.
7-
This package provides follow features:
7+
This package provides following features:
88

99
* Expandable architecture. You can easily add support for new APIs
1010
* Code cleaning. The package can automatically clean CSS and style attributes. Thus you always will receive clean and good HTML content.
1111

12-
The package use automatic algorithms for grabbing data from web pages.
12+
The package uses automatic algorithms for grabbing data from web pages.
1313
You'll receive the title and the content from needle web page.
1414

1515
## Requirements
@@ -23,7 +23,7 @@ The package requires follow solutions:
2323

2424
## Installation
2525

26-
You can install the package with Composer.
26+
You can install the package via Composer.
2727
Just run:
2828

2929
```console
@@ -38,7 +38,7 @@ Deepslam\ContentParser\ContentParserServiceProvider::class,
3838
...
3939
```
4040

41-
Next step is creating alias in your config/app.php:
41+
At next step you need to create alias in your config/app.php:
4242

4343
```php
4444
'ContentParser' => Deepslam\ContentParser\ContentParser::class,
@@ -67,8 +67,8 @@ There are two different parsers:
6767

6868
Thus you have 3 configs:
6969

70-
* /config/deepslam/parser.php - common config for all parsers. Here you can configure such options as necessary of cleaning code, stripping tags and set allow tags list.
71-
* /config/deepslam/mercury-tools.php - There is only one settings - API key for service
70+
* /config/deepslam/parser.php - This is the common config for all parsers. Here you can configure such options as necessary of cleaning code, stripping tags, set allow tags list etc.
71+
* /config/deepslam/mercury-tools.php - There is only one settings - API key for Mercury API service
7272
* /config/deepslam/graby.php - This is the copy of original settings of [graby](https://github.com/j0k3r/graby/) parser. You can read about it on [developer's page](https://github.com/j0k3r/graby/).
7373

7474
## Usage
@@ -89,13 +89,13 @@ $parser = ContentParser::create('mercury');
8989

9090
As result, you will receive ContentParser object.
9191

92-
For parse data you must use parse method which return true\false result (true if data has been received, false if not)
92+
For parse data, you must use parse method which return true\false result (true if data has been received, false if not)
9393

9494
```php
9595
$parser->parse($url)
9696
```
9797

98-
For getting result of parsing there is one method:
98+
For getting a result of parsing there is one method:
9999

100100
**getResult** - Returns needle ParsingResult object
101101

@@ -111,15 +111,15 @@ There are a few methods in this object:
111111

112112
## Extending
113113

114-
If you want to add the new package you must create the new class and inherit it from Deepslam\ContentParser\ContentParser class.
115-
You must realise the only one method - parse which must return ParsingResult object with data.
114+
If you want to add a new parser you must create a new class and inherit it from \Deepslam\ContentParser\ContentParser class.
115+
You must realise the only one method - parse which must return bool as result and changes internal result object.
116116

117117
After it, you must specific your new class in the /config/deepslam/parser.php parsers array.
118118

119119
To use you parser specify it when you call ContentParser as shows below:
120120

121121
```php
122-
$parser = ContentParser::create($extras->grab_url, '<your alias of parser>');
122+
$parser = ContentParser::create('<your alias of parser>');
123123
```
124124

125125
## Full example

0 commit comments

Comments
 (0)