Commit 0adbbf4e authored by Mehmet Kozan's avatar Mehmet Kozan

ci added.

parent 7f1e7183
Pipeline #14749687 failed with stages
in 1 minute and 47 seconds
image: node:8.9.1
#before_script:
# - npm install
#stages: build, test, and deploy.
stages:
- build
- test
package_install:
stage: build
script:
- npm install
mocha_test:
stage: test
script:
- npm run test
# crawler-url-parser
> **An `URL` parser for crawling purpose, has more than 200 unit test cases.**
![avatar of crawler-url-parser](https://assets.gitlab-static.net/uploads/-/system/project/avatar/4809017/crawler-url-parser.png)
> **An URL parser for crawling purpose, has more than 200 unit test cases.**
> ![avatar of crawler-url-parser](https://assets.gitlab-static.net/uploads/-/system/project/avatar/4809017/crawler-url-parser.png)
[![NPM Package](https://img.shields.io/npm/v/crawler-url-parser.svg?style=flat)](https://www.npmjs.org/package/crawler-url-parser)
[![Downloads Total](https://img.shields.io/npm/dt/crawler-url-parser.svg?style=flat)](https://www.npmjs.org/package/crawler-url-parser)
......@@ -23,29 +25,15 @@ console.log(url.path);
### Extract
```js
const cup = require('crawler-url-parser');
let htmlStr=
'html> \
<body> \
<a href="http://www.stackoverflow.com/internal-1">test-link-4</a><br /> \
<a href="http://www.stackoverflow.com/internal-2">test-link-5</a><br /> \
<a href="http://www.stackoverflow.com/internal-2">test-link-6</a><br /> \
<a href="http://faq.stackoverflow.com/subdomain-1">test-link-7</a><br /> \
<a href="http://faq.stackoverflow.com/subdomain-2">test-link-8</a><br /> \
<a href="http://faq.stackoverflow.com/subdomain-2">test-link-9</a><br /> \
<a href="http://www.google.com/external-1">test-link-10</a><br /> \
<a href="http://www.google.com/external-2">test-link-11</a><br /> \
<a href="http://www.google.com/external-2">test-link-12</a><br /> \
</body> \
</html>';
let currentUrl= "http://www.stackoverflow.com/aaa/bbb/ccc";
let result = cup.extract(htmlStr,currentUrl);
console.log(result.length);
const cup = require('crawler-url-parser');
```
### Level
### Query
## Test
`mocha` or `npm test`
* check test folder and quickstart.js for extra usage.
> check test folder and quickstart.js for extra usage.
## API
{
"name": "crawler-url-parser",
"version": "1.2.3",
"version": "1.2.4",
"description": "An `URL` parser for crawling purpose.",
"main": "crawler-url-parser.js",
"keywords": [
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment