wikipedia/article
read-only
Readable article content: lead, sections, infobox and categories.
await page.runPlugin("wikipedia/article")
Arguments
| Name | Type | Default | Description |
title | stringmin length 1 | | Article title, e.g. "Ada Lovelace". |
url | string | | Article URL (instead of title). |
lang | string | "en" | Language edition, e.g. en, zh, ja. |
maxSections | integer1–… | | Return at most this many sections. |
Returns
{
title: string,
url: string,
lang?: string | null,
lead: string,
sections: {
title: string,
level: integer,
text: string
}[],
infobox: {
label: string,
value: string
}[],
categories: string[],
lastModified?: string | null
}
wikipedia/search
read-only
Full-text search; returns titles, URLs and snippets.
await page.runPlugin("wikipedia/search", { query: "<query>" })
Arguments
| Name | Type | Default | Description |
queryrequired | stringmin length 1 | | |
lang | string | "en" | Language edition, e.g. en, zh, ja. |
limit | integer1–50 | 10 | |
Returns
{
query: string,
lang?: string,
total?: integer | null,
results: {
title: string,
url: string,
snippet: string,
wordCount?: integer | null,
updatedAt?: string | null
}[]
}
wikipedia/summary
read-only
Short lead summary of an article, without opening it.
await page.runPlugin("wikipedia/summary", { title: "<title>" })
Arguments
| Name | Type | Default | Description |
titlerequired | stringmin length 1 | | |
lang | string | "en" | Language edition, e.g. en, zh, ja. |
Returns
{
title: string,
lang?: string,
url?: string | null,
description?: string | null,
extract: string,
type?: string | null,
thumbnail?: string | null,
updatedAt?: string | null
}