Skip to content

ScraperJSON feature: ability to nest elements #2

@blahah

Description

@blahah

We need the ability to create nested elements.

An example use-case is getting details for authors in a journal article. Each author might have the following metadata:

  • name
  • affiliation
  • email

Ideally these things can be associated with one another, so that the extractor looks something like:

"authors": {
  "selectors": {
    "name": {
      "selector": "//some_selector",
      "attribute": "text"
    },
    "affiliation": {
      "selector": "//some_selector",
      "attribute": "text"
    },
    "email": {
      "selector": "//some_selector",
      "attribute": "text"
    }
  }
}

This allows a nice structured output like:

"authors": [
  {
    "name": "Some Person",
    "affiliation": "Miscellaneous Institute",
    "email": "their@addre.ss"
  },
  {
    "name": "Another Person",
    "affiliation": "Another Institute",
    "email": "more@addre.ss"
  }
]

tbc.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions