Skip to content

templates #14

@CorieW

Description

@CorieW

Create templates for scraping tasks. Tasks can still be defined as they are now, but templates can also be defined and then optionally referenced in tasks.

For instance, this still works:

{
  "url": "https://example.com",
  "queries": [
    {
      "id": "title",
      "type": "tag",
      "value": "h1",
      "target": "text"
    },
    {
      "id": "description",
      "type": "class",
      "value": "description",
      "target": "html"
    },
    {
      "id": "links",
      "type": "tag",
      "value": "a",
      "target": "attribute",
      "attr": "href"
    }
  ]
}

But, you may that to become a template, and then a task to be called to access the template:

{
  "template": "templateId"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions