我尝试通过 special:export 下载文件列表。 这工作正常,只要名称中没有斜杠或异国情调的字符。
Österreichischer_Fußball-Cup_2013/14 --> Slash after 2013 tried to replace slash with %2F did not work
İlhan_ Cihaner --> not in Latin
@echo off
setlocal enabledelayedexpansion
for /f %%l in (wikipedia.test) do (
curl -O http://de.wikipedia.org/wiki/Spezial:Exportieren/"%%l"
)
我已经尝试通过 Sed 进行 urlencode(仅文章名称) ,但这没有用。 也试过了
@echo off
setlocal enabledelayedexpansion
for /f %%l in (wikipedia.test) do (
curl --data-urlencode "&pages=%%l&offset=1&action=submit" http://de.wikipedia.org/w/index.php?title=Special:Export -o %%l.xml
)
在curl的手册中我没有找到提示...
最佳答案
您可以使用 'pages' 参数来 Special:Export,如下所示:
关于windows - 如何通过特殊的 :export using curl/wget on Windows 导出名称中带有斜线的维基百科文章,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24709545/