Service to parse HTML pages including javascript
469
| ENV VARIABLE | DEFAULT | DESCRIPTION |
|---|---|---|
| SERVER_PORT | 8089 | Server port |
| N/A | 10000 | HTML pages cache limit |
| N/A | 10800000ms | HTML pages cache life time |
| METHOD | URL | REQUEST BODY | RETURN BODY | Description |
|---|---|---|---|---|
| GET/PUT | /pages | String url | Get html page from url | |
| GET/PUT | /pages/elements | url, Map<queryId, cssQuery> | Map<queryId, List<Elements>> | Get specific html elements |
| GET/PUT | /pages/statistics | size, maxLifeTime, sizeLimit | Get cache statistics | |
| GET/PUT | /pages | url, content | Manual add html page to cache |
GET http://localhost:8089/pages/elements{
"url": "parse.example.com",
"css_queries": {
"form_text": "form p"
}
}
{
"form_text": [
{
"tag": "P",
"text": "Some example text here.",
"selector": "html > body > div > form > p:nth-child(1)",
"attributes": {
},
"children": [
]
}
]
}
POST http://localhost:8089/pages{
"url": "parse.example.com",
"content": "<!doctype html><html><head><title>Example Domain</title></head><body><div><h1>Example page</h1></div></body></html>"
}
POST http://localhost:8089/pages{
"url": "parse.example.com",
"content": "<!doctype html><html><head><title>Example Domain</title></head><body><div><h1>Example page</h1></div></body></html>"
}
mvn clean -Dmaven.test.skip=true packagedocker build -t paginator .docker tag "$(whoami)/paginator" SOME_REPO_PATH/paginator:latest;docker push SOME_REPO_PATH/paginator:latestContent type
Image
Digest
Size
643.8 MB
Last updated
about 4 years ago
docker pull yuna88/paginator:feat-0-multi_docker_image