import pywikibot
site = pywikibot.Site('test', 'wikipedia')
APISite("test", "wikipedia")
page = pywikibot.Page(site, 'test')
'Hello world !!!'
page.text = 'Hello world !!!'"Edit comment")
Sleeping for 19.3 seconds, 2019-02-02 22:16:50
Page [[Test]] saved
'Hello world !!!'
Help on method save in module

save(...) method of instance
    Save the current contents of page's text to the wiki.
    @param summary: The edit summary for the modification (optional, but
        most wikis strongly encourage its use)
    @type summary: unicode
    @param watch: Specify how the watchlist is affected by this edit, set
        to one of "watch", "unwatch", "preferences", "nochange":
        * watch: add the page to the watchlist
        * unwatch: remove the page from the watchlist
        * preferences: use the preference settings (Default)
        * nochange: don't change the watchlist
        If None (default), follow bot account's default settings
        For backward compatibility watch parameter may also be boolean:
        if True, add or if False, remove this Page to/from bot
        user's watchlist.
    @type watch: string, bool (deprecated) or None
    @param minor: if True, mark this edit as minor
    @type minor: bool
    @param botflag: if True, mark this edit as made by a bot (default:
        True if user has bot status, False if not)
    @param force: if True, ignore botMayEdit() setting
    @type force: bool
    @param asynchronous: if True, launch a separate thread to save
    @param callback: a callable object that will be called after the
        page put operation. This object must take two arguments: (1) a
        Page object, and (2) an exception instance, which will be None
        if the page was saved successfully. The callback is intended for
        use by bots that need to keep track of which saves were
    @param apply_cosmetic_changes: Overwrites the cosmetic_changes
        configuration value to this value unless it's None.
    @type apply_cosmetic_changes: bool or None
    @param quiet: enable/disable successful save operation message;
        defaults to False.
        In asynchronous mode, if True, it is up to the calling bot to
        manage the output e.g. via callback.
    @type quiet: bool

from pywikibot import pagegenerators
cat = pywikibot.Category(site, 'Category:Stubs')
pages = cat.articles()
for page in pagegenerators.PreloadingGenerator(pages, 100):
    print (page.text)
Retrieving 10 pages from wikipedia:test.
var wp_sk_ryzykowne = false;
; Informacje ogólne: [[WP:SK]]
; Autor: Maciej Jaros [[:pl:User:Nux]] © 2007
; Licencja: [ GNU General Public License v2]

/* ======================================================================== *\
    Moduł sprzątania kodu

    Użycie przez wp_sk.cleanup(input) np.:

    version:    1.4.1
    copyright:  (C) 2007 Maciej Jaros (pl:User:Nux, en:User:EcceNux)
    modyfikacje: pl:User:BartekChom
\* ======================================================================== */

// Clean up (WP:SK)
if (wp_sk!=undefined)
	alert('Błąd krytyczny - konflikt nazw!\n\nJeden ze skryptów używa już nazwy wp_sk jako zmienną globalną.');
var wp_sk = new Object();

// Button
wp_sk.button = function ()
	var src='';
	var btns=document.createElement('span');
		'<a href="javascript:wp_sk.cleanup(document.getElementById(\'wpTextbox1\'))">'
			+'<img style="cursor:pointer;" title="Czyszczenie kodu" alt="Czyszczenie kodu" src="'+src+'" border="0" height="22" width="23">'

	var el=document.getElementById('toolbar');
	if (el)
		if (el) el.parentNode.insertBefore(btns,el);

// Warning
wp_sk.warning = function (input)
	var el=document.getElementById('wpSummary');
	if (el.value!='')
		el.value+=', ';
	el.value+='po czyszczeniu kodu przejrzyj wykonane zmiany!'
	el.className = 'warning';

	el.className = 'warning';
		var el=document.getElementById('wpSummary');
		el.value=el.value.replace('po czyszczeniu kodu przejrzyj wykonane zmiany!', '[[WP:SK]]');

wp_sk.cleanup = function (input)

	if (wp_sk_ryzykowne)
		wp_sk.ryzykowne = confirm('Czy tym razem chcesz zastosować ryzykowne operacje?');
	var isPartSelected = false;
	if (input.selectionStart != undefined)
		var sel_s = input.selectionStart;
		var sel_e = input.selectionEnd;
		if (sel_s!=sel_e)
			var str = input.value.substring(sel_s, sel_e);
			isPartSelected = true;
	// IE...
	else if (document.selection)
		var range = document.selection.createRange();
		if (range.parentElement()==input && range.text!='')
			var str = range.text;
			isPartSelected = true;

	if (!isPartSelected)
		var str = input.value;

	// OMG - IE & Opera fix
	str = str.replace(/\r\n/g, '\n');

	// linkowato-szablonowate
	// łącza zewnętrzne do innych Wikipedii w międzywiki
		str = str.replace(/\[http:\/\/([^\.\]]*)\.wikipedia\.org\/wiki\/([^ \]]*) +([^\]]*)\]/g, '[[:$1:$2|$3]]');

	// [[Jaki%C5%9B_lnk#co.C5.9B|...]]→[[Jakiś lnk#coś|...]]
	str = str.replace(/\[\[([^|#\]]*)([^|\]]*)(\||\]\])/g, wp_sk.rLinkdecode);

	str = str.replace(/\[\[[ ]*([^\]\|]*[^\]\| ])[ ]*\|/g, '[[$1|');
	str = str.replace(/([^ \n])\[\[ +([^\]]+\]\])/g, '$1 [[$2');
	str = str.replace(/\[\[[ ]+([^\]]+\]\])/g, '[[$1');
	str = str.replace(/([^ \n])\[\[([^\]\|]+\|)[ ]+([^\]\|]+\]\])/g, '$1 [[$2$3');
	str = str.replace(/\[\[([^\]\|]+\|)[ ]+([^\]\|]+\]\])/g, '[[$1$2');
	str = str.replace(/([^ \|])[ ]+\]\]([^ \na-zA-ZżółęśąźńŻÓŁĘŚĄŹŃ])/g, '$1]] $2');
	str = str.replace(/([^ \|])[ ]+\]\]([^a-zA-ZżółęśąźńŻÓŁĘŚĄŹŃ])/g, '$1]]$2');

	str = str.replace(/\[\[(:?)[ ]*([Ii]mage|[Gg]rafika)[ ]*:[ ]*([^ ])/g, function (a,dw,co,l1) {return '[['+dw+'Grafika:'+l1.toUpperCase();} );
	str = str.replace(/\[\[(:?)[ ]*([Cc]ategory|[Kk]ategoria)[ ]*:[ ]*([^ ])/g, function (a,dw,co,l1) {return '[['+dw+'Kategoria:'+l1.toUpperCase();} );
	str = str.replace(/\[\[[ ]*(:?)[ ]*([Tt]emplate|[Ss]zablon)[ ]*:[ ]*([^ ])/g, function (a,dw,co,l1) {return '[[Szablon:'+l1.toUpperCase();} );
	str = str.replace(/\[\[[ ]*(:?)[ ]*([Ss]pecial|[Ss]pecjalna)[ ]*:[ ]*([^ ])/g, function (a,dw,co,l1) {return '[[Specjalna:'+l1.toUpperCase();} );

	str = str.replace(/\[\[[ ]*:?[ ]*[Dd]yskusja([ _][a-z]*)[ ]*:[ ]*/g, '[[Dyskusja$1:');
	// stare przestrzenie
	str = str.replace(/Dyskusja([ _])Wikipedysty/g, 'Dyskusja$1wikipedysty');

	str = str.replace(/\{\{[ ]*([Tt]emplate|[Ss]zablon|msg)[ ]*:[ ]*/g, '{{');
	// str = str.replace(/\[\[[ ]*:[ ]*pl[ ]*:[ ]*/g, '[[');
	// str = str.replace(/\[\[[ ]*pl[ ]*:[ ]*[^\]]*\]\][ \n\t]*/g, '');
	str = str.replace(/\[\[[ ]*:?[ ]*pl[ ]*:[ ]*/g, '[[');

	str = str.replace(/(\[\[Grafika:[^\|]+\|[^\|]+)\.\]\]/, '$1]]');

	str = str.replace(/\[\[([^|\]]*)\|\1([a-zA-ZżółęśąźńŻÓŁĘŚĄŹŃ]*)\]\]/g, '[[$1]]$2');

	str = str.replace(/\[\[([^|\]])([^|\]]*)\|([^\]])([^\]]*)\]\]/g, wp_sk.rLinksame);
	//^(.*?)([a-zA-Z\x80-\xff]+)$/sD - z komunikatów (nie działa)
	str = str.replace(/\[\[([^|\]]+)\|([^|\]]+)\]\]([a-zA-ZżółęśąźńŻÓŁĘŚĄŹŃ]+)/g, '[[$1|$2$3]]');

	// uczłowieczanie szablonów
		str = str.replace(/\{\{([^|\n\t{}]+)([^{}]+)\}\}/g, wp_sk.rFriendlyIbox); //podobno niezdebugowane

	// rozwijanie typowych linków
	str = str.replace(/\[\[ang\.\]\]/g, '[[język angielski|ang.]]');
	str = str.replace(/\[\[cz\.\]\]/g, '[[język czeski|cz.]]');
	str = str.replace(/\[\[fr\.\]\]/g, '[[język francuski|fr.]]');
	str = str.replace(/\[\[łac\.\]\]/g, '[[łacina|łac.]]');
	str = str.replace(/\[\[niem\.\]\]/g, '[[język niemiecki|niem.]]');
	str = str.replace(/\[\[pol\.\]\]/g, '[[język polski|pol.]]');
	str = str.replace(/\[\[pl\.\]\]/g, '[[język polski|pol.]]');
	str = str.replace(/\[\[ros\.\]\]/g, '[[język rosyjski|ros.]]');
	str = str.replace(/\[\[(((G|g)iga|(M|m)ega|(K|k)ilo)herc|[GMk]Hz)\|/g, '[[herc|');
	str = str.replace(/\[\[IPA\]\]/g, '[[Międzynarodowy alfabet fonetyczny|IPA]]');

	// ujednolicanie szablonów z [[Wikiprojekt:Sprzątanie szablonów/redirecty]] 22 XII 2007
	str = str.replace(/\{\{([sS]\||)[cC]opyvio(\||\}\})/g, '{{$1NPA$2');
	str = str.replace(/\{\{([sS]\||)[dD]oCommons(\||\}\})/g, '{{$1Do Commons$2');
	str = str.replace(/\{\{([sS]\||)[dD]oPoszerzenia(\||\}\})/g, '{{$1Do poszerzenia$2');
	str = str.replace(/\{\{([sS]\||)[dD]oPracowania(\||\}\})/g, '{{$1Dopracować$2');
	str = str.replace(/\{\{([sS]\||)[dD]oWikibooks(\||\}\})/g, '{{$1Do Wikibooks$2');
	str = str.replace(/\{\{([sS]\||)[dD]oWikicytatów(\||\}\})/g, '{{$1Do Wikicytatów$2');
	str = str.replace(/\{\{([sS]\||)[dD]oWikinews(\||\}\})/g, '{{$1Do Wikinews$2');
	str = str.replace(/\{\{([sS]\||)[dD]oWikisłownika(\||\}\})/g, '{{$1Do Wikisłownika$2');
	str = str.replace(/\{\{([sS]\||)[dD]oWikiźródeł(\||\}\})/g, '{{$1Do Wikiźródeł$2');
	str = str.replace(/\{\{([sS]\||)[dD]z. U.(\||\}\})/g, '{{$1Dziennik Ustaw$2');
	str = str.replace(/\{\{([sS]\||)[kK]oordynaty nr(\||\}\})/g, '{{$1Koordynaty$2');
	str = str.replace(/\{\{([sS]\||)[mM].P.(\||\}\})/g, '{{$1Monitor Polski$2');
	str = str.replace(/\{\{([sS]\||)[mM]erge(\||\}\})/g, '{{$1Integruj$2');
	str = str.replace(/\{\{([sS]\||)[nN]CT(\||\}\})/g, '{{$1NowCommons$2');
	str = str.replace(/\{\{([sS]\||)[oO]d[nN]owa(\||\}\})/g, '{{$1Od nowa$2');
	str = str.replace(/\{\{([sS]\||)[cC]ategoryTOC(\||\}\})/g, '{{$1Spis treści kategoria$2');
	str = str.replace(/\{\{([sS]\||)[dD]W(\||\}\})/g, '{{$1Do weryfikacji$2');
	str = str.replace(/\{\{([sS]\||)[dD]eklinacja(\||\}\})/g, '{{$1DEC$2');
	str = str.replace(/\{\{([sS]\||)[dD]elete(\||\}\})/g, '{{$1Ek$2');
	str = str.replace(/\{\{([sS]\||)[dD]oWeryfikacji(\||\}\})/g, '{{$1Do weryfikacji$2');
	str = str.replace(/\{\{([sS]\||)[eE]K(\||\}\})/g, '{{$1Ek$2');
	str = str.replace(/\{\{([sS]\||)[eE]kspresowe kasowanko(\||\}\})/g, '{{$1Ek$2');
	str = str.replace(/\{\{([sS]\||)[lL]Q(\||\}\})/g, '{{$1Słaba jakość$2');
	str = str.replace(/\{\{([sS]\||)[nN]PAgraf(\||\}\})/g, '{{$1NPA$2');
	str = str.replace(/\{\{([sS]\||)[oO]G(\||\}\})/g, '{{$1OpisujGrafiki$2');
	str = str.replace(/\{\{([sS]\||)[pP]oczSDU(\||\}\})/g, '{{$1PoczSdU$2');
	str = str.replace(/\{\{([sS]\||)[pP]oczekalnia(\||\}\})/g, '{{$1PoczSdU$2');
	str = str.replace(/\{\{([sS]\||)[pP]ektascensja(\||\}\})/g, '{{$1RA$2');
	str = str.replace(/\{\{([sS]\||)[sS]DUinfo(\||\}\})/g, '{{$1SDUinformacja$2');
	str = str.replace(/\{\{([sS]\||)[sS]DUplus(\||\}\})/g, '{{$1SdUplus$2');
	str = str.replace(/\{\{([sS]\||)[sS]d[uU](\||\}\})/g, '{{$1SDU$2');
	str = str.replace(/\{\{([sS]\||)[tT]OCmpl(\||\}\})/g, '{{$1Spis treści planetoid$2');
	str = str.replace(/\{\{([sS]\||)[tT]estAd(\||\}\})/g, '{{$1Spam$2');
	str = str.replace(/\{\{([sS]\||)[tT]estKI(\||\}\})/g, '{{$1TestK$2');
	str = str.replace(/\{\{([sS]\||)[tT]estN(\||\}\})/g, '{{$1Test3$2');
	str = str.replace(/\{\{([sS]\||)[tT]estNie(\||\}\})/g, '{{$1TestG$2');
	str = str.replace(/\{\{([sS]\||)[tT]estSpam(\||\}\})/g, '{{$1Spam$2');
	str = str.replace(/\{\{([sS]\||)[tT]estŻ(\||\}\})/g, '{{$1TestG$2');
	str = str.replace(/\{\{([sS]\||)[zZ]zW(\||\}\})/g, '{{$1Zgodnie z Wikietykietą$2');
	str = str.replace(/\{\{([sS]|[uU]nis)tub2?\}\}/g, '{{Stub}}');

	// unifikacja
	str = str.replace(/[ \n\t]*\n'''?[ ]*(Zobacz|Patrz) (też|także):*[ ]*'''?[ \n\t]*/gi, '\n\n== Zobacz też ==\n');
	str = str.replace(/[ \n\t]*\n(=+)[ ]*(Zobacz|Patrz) (też|także):*[ ]*=+[ \n\t]*/gi, '\n\n$1 Zobacz też $1\n');
	str = str.replace(/[ \n\t]*\n'''?[ ]*((Zewnętrzn[ey] )?(Linki?|Łącza)( zewnętrzn[ey])?):*[ ]*'''?[ \n\t]*/gi, '\n\n== Linki zewnętrzne ==\n');
	str = str.replace(/[ \n\t]*\n(=+)[ ]*((Zewnętrzn[ey] )?(Linki?|Łącza)( zewnętrzn[ey])?):*[ ]*=+[ \n\t]*/gi, '\n\n$1 Linki zewnętrzne $1\n');

	// poprawkowate różne (kolejność jest istotna!)

	str = str.replace(/<sup>1<\/sup>/g, '¹');
	str = str.replace(/<sup>2<\/sup>/g, '²');
	str = str.replace(/<sup>3<\/sup>/g, '³');
	str = str.replace(/<sup>o<\/sup>/g, '°');
	str = str.replace(/([0-9]) (%|‰|°)/g, '$1$2');

	str = str.replace(/(\[\[[0-9]+ (stycznia|lutego|marca|kwietnia|maja|czerwca|lipca|sierpnia|września|października|grudnia)\]\]), (\[\[[0-9]{4}\]\])/g, '$1 $3');
	str = str.replace(/(^|\n)(=+)[ ]*([^=]*[^ =])[ ]*=/g, '$1$2 $3 ='); // =a= > = a =
	str = str.replace(/(^|\n)(=+[^=]+=+)[\n]{2,}/g, '$1$2\n');
	str = str.replace(/(\n[#\*:]+)([^ \t\n*#:])/g, '$1 $2'); // listy
		str = str.replace(/ *<[bB][rR] *[\\/]? *>/g, '<br />');
		//str = str.replace(/(\,\,)([^"”]*)(["”])/g, '„$2”'); //cudzysłowy ,,coś" i "coś" na „coś”
		str = str.replace(/  +/g, ' '); // wielokrotne spacje - uwaga na <pre>
		str = str.replace(/ +\n/g, '\n');
		str = str.replace(/\{\{IPA\|\[([^\]]+)\]\}\}/g, '[{{IPA|$1}}]'); //{{IPA}}
		str = str.replace(/\{\{IPA\|\/([^\]]+)\/\}\}/g, '/{{IPA|$1}}/');
		str = str.replace(/\{\{IPA\|g\}\}/g, '{{IPA|ɡ}}');
		str = str.replace(/ - ([^0-9])/g, ' – $1'); //myślnik oznaczamy półpauzą, ale nie między liczbami
		str = str.replace(/([^0-9]) - /g, '$1 – ');
		//str = str.replace(/ /g, '&nbsp;'); //ujawnić twarde spacje
		str = str.replace(/&bull;/g, '•'); //a resztę odkodować
		str = str.replace(/&dagger;/g, '†');
		str = str.replace(/&ndash;/g, '–');
		str = str.replace(/&plusmn;/g, '±');
	str = str.replace(/\{\{[lL]ang\|cz\}\}/g, '{{lang|cs}}');
	str = str.replace(/\{\{[lL]ang\|dk\}\}/g, '{{lang|da}}');
	str = str.replace(/(?:\{\{lang\|(\w+)\}\})\s*(?:\{\{lang\|(\w+)\}\})\s*(?:\{\{lang\|(\w+)\}\})?\s*(?:\{\{lang\|(\w+)\}\})?\s*(?:\{\{lang\|(\w+)\}\})?\s*(?:\{\{lang\|(\w+)\}\})?\s*(?:\{\{lang\|(\w+)\}\})?\s*(?:\{\{lang\|(\w+)\}\})?\s*(?:\{\{lang\|(\w+)\}\})?\n/g, '{{multilang|$1|$2|$3|$4|$5|$6|$7|$8|$9}}\n');
	str = str.replace(/(?:\{\{lang\|(\w+)\}\})\s*(?:\{\{lang\|(\w+)\}\})\s*(?:\{\{lang\|(\w+)\}\})?\s*(?:\{\{lang\|(\w+)\}\})?\s*(?:\{\{lang\|(\w+)\}\})?\s*(?:\{\{lang\|(\w+)\}\})?\s*(?:\{\{lang\|(\w+)\}\})?\s*(?:\{\{lang\|(\w+)\}\})?\s*(?:\{\{lang\|(\w+)\}\})?/g, '{{multilang|$1|$2|$3|$4|$5|$6|$7|$8|$9}}');
	str = str.replace(/\{\{multilang\|([^\}]+?)(\|+)\}\}/g, '{{multilang|$1}}');
	// porządkowanie międzywiki, medali i kategorii

	/* // tworzenie {{DEFAULTSORT:}}
	z = new Array();
	y = new Array();
	z = str.match(/\[\[Kategoria:[^\]\|]*\|[^\]\|]*\]\]/g);
	y = str.match(/\[\[Kategoria:[^\]\|]*\]\]/g);
	var x = z.length>0 && y.length==0;

		for(var i=0;i<z.length;i++)
			z[i] = z[i].replace(/\[\[Kategoria:[^\]\|]*\|([^\]\|]*)\]\]/g, '$1');

		for(var i=0;i<z.length-1;i++)
			x = z[i]==z[i+1]&&x;

			str = str.replace(/\[\[Kategoria:([^\]\|]*)\|[^\]\|]*\]\]/g,'[[Kategoria:$1]]');
			str = '{{DEFAULTSORT:'+z[0]+'}}'+'\n'+str;

/* z=str.match(/\[\[Kategoria:.*?\|.*?\]\]/g)


if(z[i]==z[i+1]&&x) x=true
else x=false



} */

	// zbiórka i kasowanie
	wp_sk.defsort = new Array();
	wp_sk.defsort.i = 0;
	str = str.replace(/\{\{DEFAULTSORT:([^\}]+)\}\}/g, function(a, sort){wp_sk.defsort[wp_sk.defsort.i++]=sort; return ''});

	wp_sk.cats = new Array();
	wp_sk.cats.i = 0;
	str = str.replace(/\[\[Kategoria:([^\]\[]+)\]\]/g, function(a, cat){wp_sk.cats[wp_sk.cats.i++]=cat; return ''});

	wp_sk.iwiki = new Array();
	wp_sk.iwiki.i = 0;
	// wg:
	str = str.replace(/\[\[([a-z\-]{2,3}|simple|ru-sib|be-x-old|zh-yue|map-bms|zh-min-nan|nds-nl|bat-smg|zh-classical|fiu-vro|roa-rup|tokipona|cbk-zam|roa-tara):([^\]\|\[]+)\]\]/g, wp_sk.rGatherIWiki);

	wp_sk.iwikifa = new Array();
	wp_sk.iwikifa.i = 0;
	// wg:
	str = str.replace(/\{\{[Ll]ink FA\|([a-z\-]{2,3}|simple|ru-sib|be-x-old|zh-yue|map-bms|zh-min-nan|nds-nl|bat-smg|zh-classical|fiu-vro|roa-rup|tokipona|cbk-zam|roa-tara)\}\}/g, wp_sk.rGatherIWikifa);

	// usuwanie pozostawionych i przy okazji innych wielokrotnych, pustych linii
	str = str.replace(/[\n]{3,}/g, '\n\n');

	// wstawienie na koniec
	str = str.replace(/\s*$/, wp_sk.rOutputCats);
	str = str.replace(/\s*$/, wp_sk.rOutputIwikifa);
	str = str.replace(/\s*$/, wp_sk.rOutputIwiki);

	// zapisanie zmian
	if (!isPartSelected)
		input.value = str;
	else if (input.selectionStart!=undefined)
		input.value = input.value.substring(0, sel_s) + str + input.value.substring(sel_e)
	// IE...
	else if (document.selection)
		range.text = str;
		range.scrollIntoView(false);// at bottom



// Pomocnicze funkcje do porządkowania
wp_sk.rLinkdecode = function(a,name,anchor,end)
	return a.replace(/_/g,' ');

wp_sk.rLinksame = function (a, w1_1,w1_2n, w2_1,w2_2n)
	var w1_1_tmp = w1_1.toUpperCase();
	var w2_1_tmp = w2_1.toUpperCase();
	if (w1_1_tmp==w2_1_tmp && w1_2n==w2_2n)
		return '[['+w2_1+w2_2n+']]';
		return a;

wp_sk.rFriendlyIbox = function (a,nazwa,zaw)
	if (zaw.indexOf('\n')==-1)
		return a;
		return '{{'+nazwa+'\n'+zaw.replace(/\n(.{3,})\|\s*(?=\n)/g, '\n |$1').replace(/\|(\s*)\|(\s*)/, function(a,sp1,sp2) {return (sp1.length+sp2.length>0)?' |':'||'}).replace(/^\n+/, '')+'}}';

wp_sk.rOutputCats = function (a)
	var str = '\n';
	for (var i=0; i<wp_sk.defsort.i; i++)
		str += '\n{{DEFAULTSORT:'+wp_sk.defsort[i]+'}}';
	for (var i=0; i<wp_sk.cats.i; i++)
		str += '\n[[Kategoria:'+wp_sk.cats[i]+']]';

	return str;

wp_sk.rGatherIWiki = function (a, lang, art)
	// wg:
	if (lang!='wp' && lang!='mw' && lang!='gej' && lang!='ppr' && lang!='rfc' && lang!='uea' && lang!='why')
		wp_sk.iwiki[wp_sk.iwiki.i] = new Array(lang,art);
		return '';
		return a;

wp_sk.rOutputIwiki = function (a)
	var str = '\n';
	wp_sk.iwiki.sort(wp_sk.iwikiComp); // alfabetycznie wg kodu literowego	
	for (var i=0; i<wp_sk.iwiki.i; i++)
		str += '\n[['+wp_sk.iwiki[i][0]+':'+wp_sk.iwiki[i][1]+']]';

	return str;

wp_sk.rGatherIWikifa = function (a, lang)
	// wg:
	if (lang!='wp' && lang!='mw' && lang!='gej' && lang!='ppr' && lang!='rfc' && lang!='uea' && lang!='why')
		wp_sk.iwikifa[wp_sk.iwikifa.i] = lang;
		return '';
		return a;

wp_sk.rOutputIwikifa = function (a)
	var str = '\n';
	wp_sk.iwikifa.sort(wp_sk.iwikiComp); // alfabetycznie wg kodu literowego // tutaj wspólna funkcja wp_sk.iwikiComp
	for (var i=0; i<wp_sk.iwikifa.i; i++)
		str += '\n{{link FA|'+wp_sk.iwikifa[i]+'}}';
	return str;

wp_sk.iwikiComp = function (a, b)
	if (wp_sk.iwiki_order.indexOf(a[0]) < wp_sk.iwiki_order.indexOf(b[0]))
		return -1;
	else if (wp_sk.iwiki_order.indexOf(a[0]) > wp_sk.iwiki_order.indexOf(b[0]))
		return 1;
	// else
	return 0;

wp_sk.iwiki_order = [
	'aa', 'af', 'ak', 'als', 'am', 'ang', 'ab', 'ar', 'an', 'arc',
	'roa-rup', 'frp', 'as', 'ast', 'gn', 'av', 'ay', 'az', 'bm', 'bn',
	'zh-min-nan', 'map-bms', 'ba', 'be', 'be-x-old', 'bh', 'bcl', 'bi', 'bar', 'bo',
	'bs', 'br', 'bg', 'bxr', 'ca', 'cv', 'ceb', 'cs', 'ch', 'ny',
	'sn', 'tum', 'cho', 'co', 'za', 'cy', 'da', 'pdc', 'de', 'dv',
	'nv', 'dsb', 'dz', 'mh', 'et', 'el', 'eml', 'en', 'es', 'eo',
	'eu', 'ee', 'fa', 'fo', 'fr', 'fy', 'ff', 'fur', 'ga', 'gv',
	'gd', 'gl', 'ki', 'glk', 'gu', 'got', 'zh-classical', 'hak', 'xal', 'ko',
	'ha', 'haw', 'hy', 'hi', 'ho', 'hsb', 'hr', 'io', 'ig', 'ilo',
	'bpy', 'id', 'ia', 'ie', 'iu', 'ik', 'os', 'xh', 'zu', 'is',
	'it', 'he', 'jv', 'kl', 'pam', 'kn', 'kr', 'ka', 'ks', 'csb',
	'kk', 'kw', 'rw', 'ky', 'rn', 'sw', 'kv', 'kg', 'ht', 'kj',
	'ku', 'lad', 'lbe', 'lo', 'la', 'lv', 'lb', 'lt', 'lij', 'li',
	'ln', 'jbo', 'lg', 'lmo', 'hu', 'mk', 'mg', 'ml', 'mt', 'mi',
	'mr', 'mzn', 'ms', 'cdo', 'mo', 'mn', 'mus', 'my', 'nah', 'na',
	'fj', 'nl', 'nds-nl', 'cr', 'ne', 'new', 'ja', 'nap', 'ce', 'pih',
	'no', 'nn', 'nrm', 'nov', 'oc', 'or', 'om', 'ng', 'hz', 'ug',
	'uz', 'pa', 'pi', 'pag', 'pap', 'ps', 'km', 'pms', 'nds', 'pl',
	'pt', 'crh', 'ty', 'ksh', 'ro', 'rmy', 'rm', 'qu', 'ru', 'se',
	'sm', 'sa', 'sg', 'sc', 'sco', 'st', 'tn', 'sq', 'scn', 'si',
	'simple', 'sd', 'ss', 'sk', 'cu', 'sl', 'so', 'sr', 'sh', 'stq',
	'su', 'fi', 'sv', 'tl', 'ta', 'kab', 'roa-tara', 'tt', 'te', 'tet',
	'th', 'vi', 'ti', 'tg', 'tpi', 'to', 'chr', 'chy', 've', 'tr',
	'tk', 'tw', 'udm', 'bug', 'uk', 'ur', 'vec', 'vo', 'fiu-vro', 'wa',
	'vls', 'war', 'wo', 'wuu', 'ts', 'ii', 'yi', 'yo', 'zh-yue', 'cbk-zam',
	'diq', 'zea', 'bat-smg', 'zh'

if (!Array.prototype.indexOf)
	Array.prototype.indexOf = function(elt /*, from*/)
		var len = this.length;

		var from = Number(arguments[1]) || 0;
		from = (from < 0) ? Math.ceil(from) : Math.floor(from);
		if (from < 0)
			from += len;

		for (; from < len; from++)
			if (from in this && this[from] === elt)
				return from;
		return -1;
if(wgAction=='submit' || wgAction=='edit')
[[category:bugzilla|00903 {{PAGENAME}} {{NAMESPACE}}]]
<!-- [[category:bugzilla/00903| {{PAGENAME}} {{NAMESPACE}}]] -->
[{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=purge}} ↺]
[{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|oldid={{REVISIONID}}}} rev-ID : {{REVISIONID}}]
&rarr; [[bugzilla:00903]] &ndash; "''Unexpected reverse link on moving page''"
== links ==

* [[user:Gangleri/tests/bugzilla/00903 A]]
** [{{SERVER}}{{localurl:special:Log/move|page=user:Gangleri/tests/bugzilla/00903_A}} special:Log/move|page=user:Gangleri/tests/bugzilla/00903_A]
* [[user:Gangleri/tests/bugzilla/00903 B]]
** [{{SERVER}}{{localurl:special:Log/move|page=user:Gangleri/tests/bugzilla/00903_B}} special:Log/move|page=user:Gangleri/tests/bugzilla/00903_B]
* [[user:Gangleri/tests/bugzilla/00903 C]]
** [{{SERVER}}{{localurl:special:Log/move|page=user:Gangleri/tests/bugzilla/00903_C}} special:Log/move|page=user:Gangleri/tests/bugzilla/00903_C]

== tests ==


* [[template:Stub]]
** [[special:Whatlinkshere/template:Stub]]

=== minor changes ===

* ...
== comments ==

regards [[User:Gangleri|Gangleri]] | [[w:User:Gangleri|w:]] [ Th] | [[w:User_talk:Gangleri|T]] 12:21, 27 February 2006 (UTC)
<br>A magical mystery create or append!<br><br>
I won't say I oppose it, but is it really such a great idea? Do we really want to make past versions of our pages (with all the vandalism, libel and unwanted personal details they may contain) any easier for the world to access than we do already? [[User:Victor Yus|Victor Yus]] ([[User talk:Victor Yus|talk]]) 19:32, 29 August 2012 (UTC)

: Is there a mechanism that would prevent viewing of pages that have been rev-deleted  ?  <span style="text-shadow:black 0.2em 0.2em 0.5em; class=texhtml"><b style="color:#000"><b>"....We are all Kosh...."</b>[[User talk:KoshVorlon|<b style="color:#000">&nbsp;&nbsp;<i><-Babsdylon-5-></i></b>]]</b></span> 19:38, 29 August 2012 (UTC)
:: From what I understood, implementing this proposal will only make the already public information available in a format conforming to the Memento specification. [[User:Kephir|Keφr]] ([[User talk:Kephir|talk]]) 19:41, 29 August 2012 (UTC)
::: Correct. It's a standards based way to get to pages in history, it doesn't make anything accessible that would not be otherwise. It is a very different question whether or not past pages should be removed completely. [[User:azaroth42|azaroth42]] (spec editor)sdf
:: If someone decides to make a copy of a page which is later revdeleted, Wikipedia can't do anything about it. This wouldn't change with the new extension; so yes, there is a chance revdeleted content could be accessible if other websites choose to make a local backup of Wikipedia. This would mean, however, that each of those other websites would be responsible for any copyright violations and claims of libel, which are the primary reasons for revdeletion. <span style="text-shadow:#67A -2px 2px 15px;">[[User:Jmajeremy|<font color="#080">—JmaJeremy</font>]][[User talk:Jmajeremy|<font size="5">✆</font>]][[Special:Contributions/Jmajeremy|<font size="5">✎</font>]]</span> 22:29, 29 August 2012 (UTC)
:: This extension would definitely have to honor your user privileges on Wikipedia: if you can't access a deleted revision, you won't be able to negotiate it via this extension either. JmaJeremy is totally right about third-party reuse of Wikipedia data, check out [[Wikipedia:Wikipedia_Signpost/2011-08-29/Recent_research#Deleted_revisions_in_the_English_Wikipedia|this paper]] if you are interested in the survival of revdeleted content. --[[User:DarTar|DarTar]] ([[User talk:DarTar|talk]]) 22:48, 29 August 2012 (UTC)
:::I get the argument that anyone could be mirroring later-deleted content now.  The concern that I and others share is whether this would lead to the creation of much ''easier'' ways for the public to view deleted content.  For example, currently we have an informal gentleman's agreement with Google that they will very promptly remove deleted content from their caches.  I'd be willing to support turning it on for now, but if it results in much easier access to deleted content, I think we'd want it off again. [[User:Gigs|Gigs]] ([[User talk:Gigs|talk]]) 15:35, 30 August 2012 (UTC)
*I '''Strongly Oppose''' this.  Pages are often in a state of flux for a reason.  In theory, they are being made progressively better and more reliable.  If someone has a real reason for looking at a past revision, it can be done using the current system.  I am against making that any easier for the casual reader.  --[[User:Nouniquenames|Nouniquenames]] ([[User talk:Nouniquenames|talk]]) 15:44, 30 August 2012 (UTC)
*'''Oppose''' We take a very incremental approach to creating content, here. Early versions of articles may be unreliable, biased, wrong, spammy, flawed in any number of ways, which professionally written and edited content sites are not.  While I'm sure there are many cases where valid content has been lost, such as in edit wars or plain vandalism, I'd rather editors make a determination and restore it themselves, rather than allowing searches to sift through all the previous versions of articles for anything one might find.  [[User:Shawn in Montreal|Shawn in Montreal]] ([[User talk:Shawn in Montreal|talk]]) 20:23, 30 August 2012 (UTC)
:: (Re Shawn, Nouniquenames) The extension only makes pages that are already available accessible, via a standards based mechanism as well as the existing history pages mechanism.  One of the main strengths of Wikipedia is its openness and transparency about the editing process and history. Being able to see old revisions of a page is an important aspect of the credibility of the site.  The Memento protocol and extension do not take any standpoint on what '''should''' be accessible, and if a revision should not be accessible, then there are existing mechanisms to deal with that. The extension would simply make it easier for editors to find the older pages, in order to make the determination as to whether to restore previous text or not. [[User:Azaroth42|Azaroth42]] ([[User talk:Azaroth42|talk]]) 22:22, 30 August 2012 (UTC)
:::Whoa, wait. So deleted revisions will be shown, it's just the '''''content''''' that will remain hidden? - <b>[[User:Jc37|jc37]]</b> 00:13, 31 August 2012 (UTC)
::::My (potentially flawed) understanding is that visibility will be the same as for any current user without special rights.  Any revdel might show up that a revision was deleted, but it would be impossible to see what that revision was or what it contained.  If I'm wrong, someone please correct me.  --[[User:Nouniquenames|Nouniquenames]] ([[User talk:Nouniquenames|talk]]) 05:41, 31 August 2012 (UTC)
:::I'm not against the ability to view past revisions.  I'm against making it easier for any random passer-by to grab an old, potentially inaccurate version of a page without doing so via specific, deliberate, intentional, locally controlled steps.  (I hope I stressed that enough.)  The intelligence requirement for reading content from this site is not particularly high, and that is a good thing.  That said, it takes an extra few clicks to see an old version of a page for a reason.  If we wanted everyone to see the old version, we wouldn't have changed it.  If someone wants to see the old version, it is possible, but the (minimal) extra time and effort help to weed out those who might inadvertently stumble across an old article (possibly vandalized or incomplete) and think it the current.  To enable this, vandalism response would almost be required to include a revdel in essentially every case lest a vandalized page be what people see.  Further, if we are simply enabling a standardized API (as I understand it), we lose that control over how easily one might accidentally see an old version of a page as the current (causing or reinforcing the revdel requirement).  Absent giving everyone the ability to delete pages (at least from Memento), which would likely give quick rise to new, inventive forms of vandalism we generally don't have to deal with now, I cannot see this as a good thing.  --[[User:Nouniquenames|Nouniquenames]] ([[User talk:Nouniquenames|talk]]) 05:25, 31 August 2012 (UTC)
:: It is exactly because ''[e]arly versions of articles may be unreliable, biased, wrong, spammy, flawed in any number of ways'' that the Memento extension is so important. When taking a historical view on any matter, it is crucial to be aware of the fact that Wikipedia at the time may have had an article about it that was very different from what it is at present. See more of my reasons for supporting this request above. There I also explain why no ''random passer-by'' will accidentally ''grab an old, potentially inaccurate version of a page''. --[[User:Thüringer|Thüringer ☼]] ([[User talk:Thüringer|talk]]) 08:02, 3 September 2012 (UTC)
*'''Oppose''' We have enough edit wars over ''current'' versions of articles.  Last thing we need is more wars about trying to rewrite the past (through revdel campaigns).  More deeply, I disagree with the concept that we should "spearhead the linked data vision of an interoperable ecosystem of open licensed, structured information".  We are here to [[WP:Wikipedia is an encyclopedia|write an encyclopedia]]--a work whose intended mode of use is humans reading articles--not an "ecosystem of open licensed, structured information."  There are already companies sucking structured info out of WP content in order to undermine our share-alike licensing policies, recycling Wikipedia's work into proprietary media.  We don't have the legal means to stop them from doing that (assuming we wanted to), but it's not something we should be assisting as volunteers.  They're getting the big bucks for it, let them do the work themselves. [[Special:Contributions/|]] ([[User talk:|talk]]) 09:32, 31 August 2012 (UTC)
*:How would this extension aid them at all, unless they really really wanted to publish a book on "every version of the article on physics ever" instead of a book on "the article on physics". [[User:Okeyes (WMF)|Okeyes (WMF)]] ([[User talk:Okeyes (WMF)|talk]]) 20:37, 31 August 2012 (UTC)
*'''Strong Oppose:''' I find persuasive the argument that our purpose is to build an encyclopedia, and that Memento does not aid in doing so.  The point of the Wayback Machine is to view webpages or content that have expired or been deleted.  We already have the means to do so on Wikipedia, but since our goal is to provide the best version of information in a ''current'' format, exactly what good is this supposed to do us? [[User talk:Ravenswing|'''<span style="background:#7F00FF;color:#00FFFF"> '' Ravenswing '' </span>''']] 09:57, 1 September 2012 (UTC)
*:So, you oppose it because it doesn't contribute to our goal. What is the cost or undermining of that goal that this extension creates? :). [[User:Ironholds|Ironholds]] ([[User talk:Ironholds|talk]]) 14:17, 1 September 2012 (UTC)
::It takes time and resources (of servers and developers) which could be put toward other issues, for one. --[[User:Nouniquenames|Nouniquenames]] ([[User talk:Nouniquenames|talk]]) 14:26, 1 September 2012 (UTC)
:::No, the extension has already been developed. It's done. We're talking about how to turn it on. Yes, it'll take some server cycles - but this isn't going to be enabled unless Ops confirm that it scales. [[User:Ironholds|Ironholds]] ([[User talk:Ironholds|talk]]) 14:41, 1 September 2012 (UTC)
:::: What leads you to believe - no need to answer, because the question is rhetorical - that it wins any hearts and minds for the Support side to rebut every single Oppose voter, any more than it's the case anywhere else on Wikipedia?  I stated my position.  I am not minded to change it just because you think this extension is Wicked Cool.  If you want to debate it, take it down to the section clearly marked "Discussion." [[User talk:Ravenswing|'''<span style="background:#7F00FF;color:#00FFFF"> '' Ravenswing '' </span>''']] 17:47, 1 September 2012 (UTC)
:::::I'm rebutting ''one'' oppose vote :). And I've not explained that I think this extension is Wicked Cool; I've explained that your one reason for opposing it is somewhat weak. [[User:Ironholds|Ironholds]] ([[User talk:Ironholds|talk]]) 23:57, 1 September 2012 (UTC)
::::::And I agree that it should totally be discussed. Can I suggest you look at the discussion section, particularly the bit about server resources? Of particular interest is the line "The performance hit for a TimeGate request is significantly less than generating a history page, as it doesn't need to build the list, just find the version closest in time. As such this would be an advantage, performance wise, if people were to use it". [[User:Ironholds|Ironholds]] ([[User talk:Ironholds|talk]]) 23:58, 1 September 2012 (UTC)
::::It will never be '''done'''.  To say otherwise is to misunderstand software development.  By the same logic, we could have stopped at the first functional version of MediaWiki.  There will always be bugs, bugfixes, new features, and testing against bloody everything that is added or tweaked later.  Further, not only does it not help us, it duplicates an existing functionality.  Also, it apparently has not even begun.  Please read the intro: {{em|This is a preliminary RFC to assess community interest among English Wikipedia users for this functionality. No significant commitment of Wikimedia Foundation engineering resources has been made yet.}}  --[[User:Nouniquenames|Nouniquenames]] ([[User talk:Nouniquenames|talk]]) 05:30, 2 September 2012 (UTC)
:::::No, it hasn't been evaluated by Ops yet. The extension has been fully developed by the MementoWeb developers, and evaluated to make sure it's compatible. There seems to be a misunderstanding about how MediaWiki extension development works; the WMF doesn't write all of them (or even most of them); our volunteer developer community is responsible for quite a few. [[User:Ironholds|Ironholds]] ([[User talk:Ironholds|talk]]) 10:49, 2 September 2012 (UTC)

Lirron is a micronation.

This page is so beautiful I am mesmerized by it.

Simple is good.

{{more footnotes|date=August 2012}}

I'm afraid this is another test here.


Rock and roll music often has drums and guitars.
#REDIRECT [[Category:Stubs]]
Unicorns are like a horse with one horn. But WAYYY more awesome. Plus, they taste a helluva lot better.

{{Cite book | title = Petition seeks apology for Enigma code-breaker Turing | url = }}
{{Cite book|title=Thousands call for Turing apology |url= |publisher=BBC News }}
{{citeweb|url=|title=composition of air}}



Windowewz lovesss unicornz

[[Category:Article Feedback 5 Additional Articles]]
{{speedy deletion-attack}}

{{Multiple issues|{{copy edit|date=September 2012}}{{refimprove|date=September 2012}}}}

gen = pagegenerators.SearchPageGenerator(u'steel', namespaces = [0])
for page in gen:
[[test:Barack Obama]]
[[test:Featured pictures]]
[[test:History of the St. Louis Rams]]
[[test:Northern England]]
[[test:San Francisco]]
[[test:Test page long]]
[[test:WikiProject Directory]]
! ls /home/paws
Testing Piwikibot.ipynb  User_talk_Tdbot
topics_dict_string = '''{
    'low dose naltrexone':'Q5259325',
    'Behçet disease':'Q911427',
    'Ehlers Danlos':'Q1141499',


for key in topics_dict:
    print(f'{key} item is {topics_dict[key]}')
low dose naltrexone item is Q5259325
Behçet disease item is Q911427
Ehlers Danlos item is Q1141499
fibromyalgia item is Q540571
    'low dose naltrexone':'Q5259325',
    'Behçet disease':'Q911427',
    'Ehlers Danlos':'Q1141499',
    'tachykinin receptor':'Q426034',
    'toll like receptor':'Q408004',
    'tumour necrosis factor':'Q18032037',
    'adenosine triphosphate':'Q80863',