These days Wikimedia uses a plain PHP array intstead of a CDB file so the script fails when trying to fetch https://noc.wikimedia.org/conf/interwiki.cdb
. As a workaround, create the file manually:
- download
https://noc.wikimedia.org/conf/interwiki.php
- run
mwscript shell.php
to get a PHP shell -
$data = require .../interwiki.php;
-
$cdb = \Cdb\Writer::open( '.../interwiki.cdb' );
-
foreach ( $data as $key => $val ) $cdb->set( $key, $val );
-
$cdb->close();
- You can run the Python script now.