Manual talk:Pywikibot/2012

Latest comment: 12 years ago by Zackmann08 in topic API Issues...

API Issues...

edit

I am trying to setup pywikipedia on my wiki (www.imfdb.org). I cannot get it work though. I either get a "No JSON object could be decoded" error or the connection just times out. Anyone with experience using pywikipedia willing to help me out? I would be eternally grateful! Below is some of the necessary code:

imfdb_family.py

# -*- coding: utf-8 -*-
"""
This family file was auto-generated by $Id: generate_family_file.py 9734 2011-11-09 22:17:11Z valhallasw $
Configuration parameters:
  url = http://www.imfdb.org/w/index.php
  name = imfdb

Please do not commit this to the SVN repository!
"""

import family

class Family(family.Family):
    def __init__(self):
        family.Family.__init__(self)
        self.name = 'imfdb'
        self.langs = {
            'en': u'www.imfdb.org',
        }

        self.namespaces[4] = self.namespaces.get(4, {})
        self.namespaces[4]['en'] = [u'imfdb :. guns in movies :. movie guns :. the internet movie firearms database']
        self.namespaces[5] = self.namespaces.get(5, {})
        self.namespaces[5]['en'] = [u'imfdb :. guns in movies :. movie guns :. the internet movie firearms database talk']
        self.namespaces[6] = self.namespaces.get(6, {})
        self.namespaces[6]['en'] = [u'Image']
        self.namespaces[7] = self.namespaces.get(7, {})
        self.namespaces[7]['en'] = [u'Image talk']


    def scriptpath(self, code):
        return {
            'en': u'/w',
        }[code]

    def version(self, code):
        return {
            'en': u'1.16.2',
        }[code]

user-config.py

mylang = 'en'
usernames['imfdb']['en']=u'CleanupBot'
family = 'imfdb'

THANKS! Zackmann08 (talk) 19:04, 26 June 2012 (UTC)Reply

Return to "Pywikibot/2012" page.