我需要在Google Sheets中完成此操作,并使用以下公式实现。假定维基百科标题位于B列。复制到所需的行。
=IMPORTXML(concat("https://en.wikipedia.org/w/api.php?action=query&prop=pageprops&ppprop=wikibase_item&redirects=1&format=xml&titles=",B1),"//@wikibase_item")
另一个建议是使用转储文件https://dumps.wikimedia.org/enwiki/latest/enwiki-latest-page_props.sql.gz,压缩后大小为230Mb。