Skip to content

Commit f11bb37

Browse files
committed
limit the spider name only to be any combination of numbers or letters or underscores, and can't start with a number, 30 characters at most.
1 parent dbb5b5d commit f11bb37

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

Docs/FullDemo.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
Well, this is an full demo example to show how to `capture the weather in Washington in 7 days`
22
```php
33
<?php
4+
//Note: if this example provided by the PHPCreeper does not work as expected,
5+
//check to modify the crawl rules, as the source DOM is most likely updated.
46
require "./vendor/autoload.php";
57

68
use PHPCreeper\PHPCreeper;
@@ -101,7 +103,7 @@ function startAppProducer()
101103

102104
//use string: not recommended to use because the configuration is limited.
103105
//so the question is that you need to process the fetching result by yourself
104-
//$task = "https://github.com/search?q=stars:%3E1&s=stars&type=Repositories";
106+
//$task = "https://forecast.weather.gov/MapClick.php?lat=47.4113&lon=-120.5563";
105107
//$producer->createTask($task);
106108
//$producer->createMultiTask($task);
107109

@@ -254,7 +256,7 @@ startAppServer();
254256
PHPCreeper::start();
255257
```
256258

257-
Now, save the example code above to a file and name it to be `github.php` as a startup script, then run it like this:
259+
Now, save the example code above to a file and name it to be `weather.php` as a startup script, then run it like this:
258260
```
259-
/path/to/php github.php start
261+
/path/to/php weather.php start
260262
```

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,11 @@ which will greatly improve your job efficiency. Besides, we can also write
8787
the code which **NOT** depends on the framework, it is also easy to make it.
8888

8989
Next let's take an example to show how to `capture the weather in Washington in 7 days`:([**See Full Demo Here**](/Docs/FullDemo.md))
90+
9091
```php
9192
<?php
93+
//Note: if this example provided by the PHPCreeper does not work as expected,
94+
//check to modify the crawl rules, as the source DOM is most likely updated.
9295
require "./vendor/autoload.php";
9396

9497
use PHPCreeper\PHPCreeper;
@@ -300,9 +303,9 @@ startAppServer();
300303
PHPCreeper::start();
301304
```
302305

303-
Now, save the example code above to a file and name it to be `github.php` as a startup script, then run it like this:
306+
Now, save the example code above to a file and name it to be `weather.php` as a startup script, then run it like this:
304307
```
305-
/path/to/php github.php start
308+
/path/to/php weather.php start
306309
```
307310

308311
## Usage: Depend On The PHPCreeper Application Framework

0 commit comments

Comments
 (0)