Hi all,
I've run into an interesting issue on Portuguese Wikipedia, with a user
page that's in the aliased user namespace:
import pywikibot;
site = pywikibot.getSite('pt');
page = pywikibot.Page(site, u"Usuário:Vitorvicentevalente");
page.title();
u'Usu\xe1rio(a):Vitorvicentevalente'
page.get()
[NOTE: callback trace removed for brevity]
pywikibot.exceptions.Error: loadrevisions: Query on
[[pt:Usuário(a):Vitorvicentevalente]] returned data on
'Usuário:Vitorvicentevalente'
According to the API "Usuário" is a valid namespace alias[1]. Is there an
easy workaround or fix here?
Also, I've noticed this is not an issue in trunk, it's just the rewrite
branch that produces this error.
Footnotes:
1: ref:
http://pt.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=general…
Regards,
Morten
Hi Amir
the point is there may be an existing data item without language link to fa-wiki and a bot is able to create a new repository item for fa-wiki without having any language links (or having it's own link cluster). Before a bot creates a data repository item we must be be sure that a repository item does not already exists. I am unsure whether this is a job for bots.
sample:
existing item Q1234 with links en:Hello, fr:Bonjour, es:Hola
your bot find a new page de:Hallo without language links (or with link to nl:Hoi which has no entry in Q1234 yet).
You are wrongly able to create a new data item for de:Hallo via bot. But you first must check that the content of de:Hallo does not match any other content of any other data items's language links (which is in this sample the content of Q1234's language links). So you must not use this code snippet without having care on this matter.
Regards
xqt
----- Original Nachricht ----
Von: Amir Ladsgroup <ladsgroup(a)gmail.com>
An: Pywikipedia discussion list <pywikipedia-l(a)lists.wikimedia.org>
Datum: 26.02.2013 10:19
Betreff: Re: [Pywikipedia-l] Creating wikidata items
> Dear xqt, is it ok?
>
> # -*- coding: utf-8 -*-
> import wikipedia
> site=wikipedia.getSite('fa',
> fam='wikipedia')
> listofarticles=[u"???? ???????",u"???? ????"]
> for name in listofarticles:
> page=wikipedia.Page(site,name)
> data=wikipedia.DataPage(page)
> try:
> items=data.get()
> except wikipedia.NoPage:
> print "The item doesn't exist. Creating..."
> data.createitem("Bot: Importing article from Persian wikipedia")
> else:
> print "It has been created already. Skipping..."
> I tested it, it was ok. but I'm not sure
>
>
>
> On Tue, Feb 26, 2013 at 11:49 AM, <info(a)gno.de> wrote:
>
> > Hi folks,
> >
> > Reza1615 as published a small code snippet to create items at data
> > repository. Please use this sample with care becaus it does not test
> > whether a data repository item already exists. It only test whether it
> > exists for a given site page. This could also mean that a given site page
> > as no language link on a given repository page. This must be checked
> before
> > a page is created.
> >
> > Regards
> > xqt
> >
> > _______________________________________________
> > Pywikipedia-l mailing list
> > Pywikipedia-l(a)lists.wikimedia.org
> > https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
> >
>
>
>
> --
> Amir
>
>
> --------------------------------
>
> _______________________________________________
> Pywikipedia-l mailing list
> Pywikipedia-l(a)lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
>
Hello,
I'm a Python programmer, and user of Pywikipediabot, and I'd like commit access, mainly to commit minor fixes for now, maybe for more things in the future.
Hazard-SJ
Hello,
I am writing a bot to upload svn commited files to my MediaWiki. The
authentication is done by LDAP / Active Directory. For humans it works.
But with my bot it fails:
PHP Warning: ldap_start_tls(): Unable to start TLS: Can't contact
LDAP server in
/var/www/mediawiki-git/extensions/LdapAuthentication/LdapAuthentication.php
on line 576
Where is my error? Thank you very much.
Best regards
Mario
Hello all,
I am terribly sorry for letting this mail slip through. Nicolas was on the
'automatically accept' filters list (together with Maarten (multichill),
Siebrand and myself). An app he installed caused spam to be sent to all of
his contacts - including this mailing list.
I have now removed all four of us from that list, which means any e-mails
sent to pywikipedia-announce will have to be explicitly OK'ed in the web
interface. This should prevent any unsolicited e-mails in the future.
Again, sorry for the inconvenience caused!
Best,
Merlijn van Deen (valhallasw)
_______________________________________________
Pywikipedia-announce mailing list
Pywikipedia-announce(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-announce
Nicolas left a message for you
Its sender and content will be shown only to you and you can delete it at any time. You can instantly reply to it, using the message exchange system. To find out what was written to you, just follow this link:
http://eu1.blendr.com/0312806378/in/qyImyDLa.Hc/?lang_id=106&g=57&m=21&mid=…
Some other people in the area who are on Badoo
ç Pippo (, )
Angelina (, )
Sändy (Zürich, Schweiz)
http://eu1.blendr.com/0312806378/in/qyImyDLa.Hc/?lang_id=106&g=57&m=21&mid=…
If clicking the links in this message does not work,
copy and paste them into the address bar of your browser.
This email is a part of delivering a message sent by Nicolas on the system. If you received this email by mistake, please just ignore it. After a short time the message will be removed from the system.
Have fun!
The Blendr Team
Blendr is powered by Badoo. You have received this email from Badoo Trading Limited (postal address below).
If you do not wish to receive further email communications from Badoo, http://eu1.blendr.com/impersonation.phtml?lang_id=106&email=pywikipedia-l%4… here to opt out.
Badoo Trading Limited is a limited company registered in England and Wales
under CRN 7540255 with its registered office at Media Village, 131 - 151 Great Titchfield Street, London, W1W 5BB.
Hello,
Pywikipedia uses its own translations of the canonical namespaces. When
these translations are incorrect, the bot will edit the main namespace
instead. For example, pywikipedia currently translates the "User" namespace
as "Wikipedysta" on pl-wikivoyage, but the correct namespace is
"Użytkownik".
Is there a way to page.put() with the canonical namespace instead of a
translated namespace?
--
Yours cordially,
Jesse (Pathoschild)
There is no pywikipedia bot for work with wikidata yet, only 16 days
left and most of categories and community pages have no entry in
wikidata yet.
I am not able to write this bot, but it seems is not difficult read
interwikilinks from wikidata using API
https://wikidata.org/w/api.php?action=wbgetentities&sites=cswiki&titles=Cha…
If nothing more, we can check, if there are all links, as first step
it would be useful.
JAnD