Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Well the fact that <code>login.py</code> tries accessing '\w' instead of your path shows that there is a family configuration issue.</p> <p>Your code is indented strangely: is <code>scriptpath</code> a member of the new Family class? as in:</p> <pre><code>class Family(family.Family): def __init__(self): family.Family.__init__(self) self.name = 'mywiki' self.langs = { 'en' : 'local.example.com'} def scriptpath(self, code): return '/mywiki' def version(self, code): return '1.13.5' def isPublic(self): return False def hostname(self, code): return 'local.example.com' def protocol(self, code): return 'https' </code></pre> <p>?</p> <p>I believe that something is wrong with your family file. A good way to check is to do in a python console:</p> <pre><code>import wikipedia site = wikipedia.getSite('en', 'mywiki') print site.login_address() </code></pre> <p>as long as the relative address is wrong, showing '/w' instead of '/mywiki', it means that the family file is still not configured correctly, and that the bot won't work :)</p> <p><strong>Update</strong>: how to integrate ntlm in pywikipedia?</p> <p>I just had a look at the basic example <a href="http://code.google.com/p/python-ntlm/" rel="nofollow noreferrer">here</a>. I would integrate the code before that line in <code>login.py</code>:</p> <pre><code>response = urllib2.urlopen(urllib2.Request(self.site.protocol() + '://' + self.site.hostname() + address, data, headers)) </code></pre> <p>You want to write something of the like:</p> <pre><code>from ntlm import HTTPNtlmAuthHandler user = 'DOMAIN\User' password = "Password" url = self.site.protocol() + '://' + self.site.hostname() passman = urllib2.HTTPPasswordMgrWithDefaultRealm() passman.add_password(None, url, user, password) # create the NTLM authentication handler auth_NTLM = HTTPNtlmAuthHandler.HTTPNtlmAuthHandler(passman) # create and install the opener opener = urllib2.build_opener(auth_NTLM) urllib2.install_opener(opener) response = urllib2.urlopen(urllib2.Request(self.site.protocol() + '://' + self.site.hostname() + address, data, headers)) </code></pre> <p>I would test this and integrate it directly into pywikipedia codebase if only I had an available ntlm setup...</p> <p>Whatever happens, please do not vanish with your solution: we're interested, at pywikipedia, by your solution :)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload