Skip to content

Latest commit

 

History

History
84 lines (79 loc) · 1.35 KB

README.md

File metadata and controls

84 lines (79 loc) · 1.35 KB

Install

git clone https://github.com/Neotoxic-off/Juice
cd Juice

docker-compose up --build

Usage

r = requests.post("http://127.0.0.1:8081/scrap", json = {
    "method": "GET",
    "host": "https://example.com",
    "params": [],
    "tag": "a",
    "element": "href",
    "attrs": {},
    "headers": {},
    "data": {},
    "range": [0, 10],
    "ptag": "page"
})

Options

  • Method: GET, POST, PUT, DELETE, PATCH
  • Host: https://example.com
  • Params:
[
    ["param1", "paramvalue1"]
]
  • Tag: img, a, p, ...
  • Element: href, src, class, ...
  • Attrs:
{
    "class": "avatar",
    "id": "main"
}
  • Headers:
{
    "User-Agent": "Example",
    "Token": "issou"
}
  • Data:
{
    "EXAMPLE": "DATA"
}
  • Range: [0, 3]
  • Ptag: page, p

Request

  • Method: POST
  • Route: /scrap
  • Json:
{
    "method": "GET",
    "host": "https://github.com/Neotoxic-off",
    "params": [
        ["tab", "repositories"]
    ],
    "tag": "img",
    "element": "src",
    "attrs": {
        "class": "avatar avatar-user width-full border color-bg-default"
    },
    "headers": {},
    "data": {},
    "range": [0, 3],
    "ptag": "page"
}