有没有URL可以直接获取维基百科条目的原始标签,而不是HTML?也就是说,我只想得到这样的东西,
{{about|the cat species that is commonly kept as a pet|the cat family|Felidae|other uses|Cat (disambiguation)|and|Cats (disambiguation)}}....不,
<!DOCTYPE html>
<html class="client-nojs" lang="en" dir="ltr">
<head>
<meta charset="UTF-8"/>
<title>Cat - Wikipedia</title> ....我已经从谷歌上找到了答案,但找不到答案。我能找到的最接近的网址是像https://en.wikipedia.org/w/index.php?title=Cat&action=edit这样的东西,我可以从中提取标签,但它仍然包含不必要的HTML内容。
发布于 2019-02-25 00:56:48
您所说的“标记”是Wikitext语法。它可以通过使用“原始”操作在任何页面上获得,比如https://en.wikipedia.org/w/index.php?title=Cat&action=raw。请注意,您将获得与您使用的action=edit完全相同的内容,没有其他版本没有“不必要的HTML内容”。
https://stackoverflow.com/questions/54852785
复制相似问题