Learn R Programming

hoopR (version 3.1.0)

.next_data: Internal: extract and parse the Next.js __NEXT_DATA__ JSON from a page

Description

Sites built on Next.js (e.g. HoopsHype) embed their hydrated data in a <script id="__NEXT_DATA__"> JSON blob. This returns that parsed list.

Usage

.next_data(doc)

Value

The parsed __NEXT_DATA__ as a list, or NULL if absent.

Arguments

doc

An xml_document from .ext_html().