기본적으로 모든 파일 형식은 API에 의해 동일하게 취급되지만 각 파일의 mediatype을 가져 와서 비디오 및 오디오 파일을 필터링 할 수 있습니다.
파일의 mediatype을 얻으려면 각 파일에 대해 prop=imageinfo
(이 will be changed을 더 정확하게 prop=fileinfo
으로 사용)을 사용하십시오. prop=images
가 발전기로 사용할 수 있습니다, 당신은 this처럼, 하나의 API 호출로, 파일의 목록과 자신의 MediaType를 얻을 수 있습니다 : 여기 images
https://ar.wikipedia.org/w/api.php?action=query&generator=images&titles=%D8%AD%D9%88%D8%AB%D9%8A%D9%88%D9%86&redirects=&prop=imageinfo&iiprop=mediatype&continue=&format=xml
을 발전기로 사용, 목록을 반환 파일의 목록에있는 파일 목록은 imageinfo
호출에 공급됩니다.
"2014232": {
"pageid": 2014232,
"ns": 6,
"title": "\u0645\u0644\u0641:06-Salame-Al Aadm 001.ogg",
"imagerepository": "local",
"imageinfo": [
{
"mediatype": "AUDIO"
}
]
}
는 mediatype
합니다 (manual에서 복사 및 붙여 넣기) 다음 중 하나 일 수 있습니다 :
UNKNOWN // unknown format
BITMAP // some bitmap image or image source (like psd, etc). Can't scale up.
DRAWING // some vector drawing (SVG, WMF, PS, ...) or image source (oo-draw, etc). Can scale up.
AUDIO // simple audio file (ogg, mp3, wav, midi, whatever)
VIDEO // simple video file (ogg, mpg, etc; no not include formats here that may contain executable sections or scripts!)
MULTIMEDIA // Scriptable Multimedia (flash, advanced video container formats, etc)
OFFICE // Office Documents, Spreadsheets (office formats possibly containing apples, scripts, etc)
TEXT // Plain text (possibly containing program code or scripts)
EXECUTABLE // binary executable
ARCHIVE // archive file (zip, tar, etc)
기본 각 파일에 대해
, 당신은 이런 식으로 뭔가를 얻을 것이다 mimetype < => mediatype의 매핑은
here이 가능합니다. 그러나 개별 wiki에서이를 오버라이드 할 수는 있습니다.