Closed MvGulik closed 5 years ago
The first output is the result of JSON format version 1, which is the default, whereas the second output is the result of JSON format version 2. You’re probably sending a formatversion=2
parameter with your mwapi
request, but didn’t set it in the API sandbox (it’s under the format=json
“tab”).
Darn, formatversion never entered my mind. :-/
Your right, I was using different formatversions on the different calls. Thanks.
(Closing)
Never really spotted, or realized this before. (although there has been some nagging feeling about mwapi's result output from time to time)
When pulling some imageinfo data with the MW API-sandbox I got:
But when I use mwapi I get:
The page-id and its containing dictionary are gone, replaced by a list containing the per-page imageinfo-datablock's
??? Should the output on both calls not be the same in structure ? Is there any additional reading material on this ?
Os: Linux, ... Python: 3.5.x MWapi: 0.5.1 (MediaWiki: 1.31.0)
(not checked against other mw-queries - yet) (not re-checked mwapi docs - yet)