Open main menu

User:Reza1615/BOT/config b.py

you should write your toolserver (if you have) account address like:

/home/someone/pywikipedia/passfile

codeEdit

import wikipedia,config
api = 'http://www.wikidata.org/w/api.php'
try:
        password_fa = open("/home/someone/pywikipedia/passfile", 'r')
except:
        password_fa = open(wikipedia.config.datafilepath(config.password_file), 'r')
password_fa = open(wikipedia.config.datafilepath(config.password_file), 'r')
password_fa=password_fa.read().replace('"','').strip()
username = password_fa.split('(')[1].split(',')[0].split(')')[0].strip()
password = password_fa.split('(')[1].split(',')[1].split(')')[0].strip()
botflag = True # if you have a Botflag change this to True