Usunięta treść Dodana treść
Odp:Bot
 
interwiki_text_separator
Linia 3:
;[{{fullurl:Dyskusja_Wikipedysty:Alkamid|oldid=2083838}}#Bot Odp:Bot]
Unfortunately, I don't know who might help you. [[User:masti]] tried to set his bot to add interwikis but got the same result (new lines). It seems to be a common problem: "illegal" [[Specjalna:Wkład/CarsracBot|CarsracBot]] does the same thing. [[Wikipedysta:Alkamid|Alkamid]] ([[Dyskusja Wikipedysty:Alkamid|dyskusja]]) 16:53, 13 maj 2011 (CEST)
 
----
I have never run pywikipedia bot (my Olafbot uses Java), but is it really so hard to configure to give up immediately? Having a look at the source code, I found an interesting option in family.py:
 
<source lang="python">
# String used as separator between interwiki links and the text
self.interwiki_text_separator = '\r\n\r\n'
</source>
 
It is used in pywikibot/textlib.py and seems to be responsible for those annoying white lines.
I think, you should add in families/wiktionary_family.py someting like:
 
<source lang="python">
self.interwiki_text_separator = ''
</source>
 
or perhaps
 
<source lang="python">
self.interwiki_text_separator = {
'_default': '',
'pl' : '',
}
</source>
 
In the second case I'm not quite sure, if the bot is able to select Polish wiktionary version automatically, or some additional code is required, so if it didn't work, please let me know, and I will try to patch it.
 
Best, [[Wikipedysta:Olaf|Olaf]] ([[Dyskusja Wikipedysty:Olaf|dyskusja]]) 21:00, 13 maj 2011 (CEST)