Thank you, thank you! :-)
2010/9/8 xqt@svn.wikimedia.org
Revision: 8504 site generator for special:wantedcategories
return
"%s?title=%s:wantedcategories&limit=%d&useskin=monobook&uselang=en" % (self.path(code), self.special_namespace_url(code), limit)
With this, will that work for all wikis? In huwiki
'<li><a href=".+?" class="new" title="(?P<title>.+?)
(page does not exist)">.+?</a> .+?)</li>')
is "(megíratlan szócikk) "
I already wrote my version, but this one is much better.
It should work on all wikis maybe depending of the mw version. The trick is "&uselang=en". Unfortunately the most special pages are not availlable via API and this screen scrapping is needed.
xqt
----- Original Nachricht ---- Von: Bináris wikiposta@gmail.com An: pywikipedia-l@lists.wikimedia.org Datum: 08.09.2010 20:22 Betreff: Re: [Pywikipedia-l] [Pywikipedia-svn] SVN: [8504] trunk/pywikipedia
Thank you, thank you! :-)
2010/9/8 xqt@svn.wikimedia.org
Revision: 8504 site generator for special:wantedcategories
return
"%s?title=%s:wantedcategories&limit=%d&useskin=monobook&uselang=en" % (self.path(code), self.special_namespace_url(code), limit)
With this, will that work for all wikis? In huwiki
'<li><a href=".+?" class="new" title="(?P<title>.+?)
(page does not exist)">.+?</a> .+?)</li>')
is "(megíratlan szócikk) "
I already wrote my version, but this one is much better.
-- Bináris
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Heute erleben, was morgen Trend wird - das kann man auf der IFA in Berlin. Oder auf arcor.de: Wir stellen Ihnen die wichtigsten News, Trends und Gadgets der IFA vor. Natürlich mit dabei: das brandneue IPTV-Angebot von Vodafone! Alles rund um die Internationale Funkausstellung in Berlin finden Sie hier: http://www.arcor.de/rd/footer.ifa2010
On 8 September 2010 20:22, Bináris wikiposta@gmail.com wrote:
With this, will that work for all wikis? In huwiki
'<li><a href=".+?" class="new" title="(?P<title>.+?)
(page does not exist)">.+?</a> .+?)</li>')
Good question. Yes, it will: pywikipediabot asks for the english translation of the wiki:
def wantedcategories_address(self, code, limit=500): return "%s?title=%s:wantedcategories&limit=%d&useskin=monobook* &uselang=en*" % (self.path(code), self.special_namespace_url(code), limit)
The uselang=en trick is a good one to remember - for instance if you want to find the edit button on a wiki in a language you don't understand. You can add it to any url:
http://fi.wikipedia.org/wiki/Wikipedia:Etusivu?uselang=en or http://fi.wikipedia.org/w/index.php?title=Wikipedia:Etusivu&action=histo...
Best regards, Merlijn van Deen
pywikipedia-l@lists.wikimedia.org