WikiTeam / wikiteam

Tools for downloading and preserving wikis. We archive wikis, from Wikipedia to tiniest wikis. As of 2024, WikiTeam has preserved more than 600,000 wikis.
https://github.com/WikiTeam
GNU General Public License v3.0
730 stars 151 forks source link

simplejson.errors.JSONDecodeError in Getting the XML header from the API #379

Open nemobis opened 4 years ago

nemobis commented 4 years ago

Worth fixing soon given this wiki is closing:


https://wiki.dystify.com/api.php
Getting the XML header from the API
Traceback (most recent call last):
  File "dumpgenerator.py", line 2528, in <module>
    main()
  File "dumpgenerator.py", line 2520, in main
    createNewDump(config=config, other=other)
  File "dumpgenerator.py", line 2087, in createNewDump
    generateXMLDump(config=config, titles=titles, session=other['session'])
  File "dumpgenerator.py", line 709, in generateXMLDump
    header, config = getXMLHeader(config=config, session=session)
  File "dumpgenerator.py", line 429, in getXMLHeader
    xml = r.json()['query']['export']['*']
  File "/home/users/federico/.local/lib/python2.7/site-packages/requests/models.py", line 897, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python2.7/dist-packages/simplejson/__init__.py", line 518, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
nemobis commented 4 years ago
$ python dumpgenerator.py --xml --index=https://wiki.dystify.com/index.php
API not available. Trying with index.php only.
ERROR: The wiki returned status code HTTP 406
Error in index.php.
Please, provide a correct path to index.php or use --xmlrevisions. Terminating.