Download the PHP package divineomega/wikipedia-info-box-parser without Composer
On this page you can find all versions of the php package divineomega/wikipedia-info-box-parser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download divineomega/wikipedia-info-box-parser
More information about divineomega/wikipedia-info-box-parser
Files in divineomega/wikipedia-info-box-parser
Package wikipedia-info-box-parser
Short Description Parses the info boxes on Wikipedia pages into an associative array
License LGPL-3.0-only
Informations about the package wikipedia-info-box-parser
Wikipedia Infobox Parser
Parse a Wikipedia article's first matching infobox into an associative array, including complete category and article-link lists.
Installation
Usage
The parser uses balanced template and link delimiters, so nested templates,
multiline values, embedded pipes, and equals signs remain part of the correct
field. Values equal to 0 are retained. All values are rendered together in a
single MediaWiki parse request instead of one request per field.
HTML values
Plain text is returned by default. To retain MediaWiki's rendered HTML:
Selecting a template or Wikipedia edition
Infobox matches normal variants such as Infobox person. Select a more
specific prefix or a trusted alternate MediaWiki endpoint when needed:
The reserved _categories and _links arrays follow every MediaWiki
continuation page and are deduplicated. Missing articles, malformed templates,
API errors, bad JSON, and HTTP failures throw clear exceptions.
Caching and HTTP transport
Results are cached indefinitely in a system temporary directory by default. You can provide any PSR-6 pool, set a TTL, or disable caching:
The optional second constructor argument is a callable receiving the endpoint, POST body, headers, and timeout. It is also shared with the batched wikitext renderer and must return the response body as a string.
The package supports PHP 7.1 through current PHP 8.x releases, Wikitext Parser 3.1+, and DO File Cache PSR-6 v3 or v4.
All versions of wikipedia-info-box-parser with dependencies
ext-json Version *
ext-dom Version *
jord-jd/do-file-cache-psr-6 Version ^3.0||^4.0
jord-jd/php-wikitext-parser Version ^3.1