Wikipedia:Projekt DotNetWikiBot Framework/GameOnBot/FixaEfterFlyttFrånBeta

Från Wikipedia
using System;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Collections;
using System.Xml;
using DotNetWikiBot;
using System.Threading;
using System.Collections.Generic;

class MyBot : Bot
{
	public static void Main()
	{
		Site site = new Site("http://sv.wikiversity.org", user, password);
		PageList pl = new PageList(site);
		string tmpStr;
		
		pl.FillFromAllPages("", 0, false, 1000);
		//pl.RemoveNamespaces(new int[] {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,100,101}); 
		foreach (Page myPage in pl)
		{
			myPage.Load();
			tmpStr = myPage.text;
			myPage.text = myPage.text.Replace("[[w:sv:", "[[w:");
			if(myPage.text != tmpStr)
			{
				myPage.Save(myPage.text, "w:sv: -> w: eftersom sv är default för w: sedan projektet flyttades från beta", true);
				Thread.Sleep(7000);
			}
		}
	}
}