windows - 如何通过特殊的 :export using curl/wget on Windows 导出名称中带有斜线的维基百科文章

标签 windows curl mediawiki wget wikipedia

我尝试通过 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的手册中我没有找到提示...

最佳答案

关于windows - 如何通过特殊的 :export using curl/wget on Windows 导出名称中带有斜线的维基百科文章,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24709545/

相关文章:

c - 如何访问 CPU 的热传感器?

java - Window/linux 路径组件分离

php - 使 cURL 在收到数据时写入数据

php - Apple APNS - 未捕获的异常 : Curl failed: No URL set

javascript - 如何从 wikipedia api 获取表数据作为行和列?

c# - .Net TimeZoneInfo ID - 它是特定于 Windows 语言的吗?

Python GET 中的请求错误,但 wget 和curl 可以工作

api - 如何使用 mediawiki api 获取维基百科文章中的所有 url(不仅仅是标题)?

wiki - 谷歌 AdSense 下面是 MediaWiki 中的文章

windows - 使用 mklink 将一个文件夹中的 dll 文件符号链接(symbolic link)到另一个文件夹