Forum:Large job

We've been linking to some pages on the official RuneScape page, though they've updated all the URLs. So every single website has to be changed, and this is a huge job. Is there a bot or something that can fix this?--Richard (Talk - Contribs) 20:48, 24 April 2007 (UTC)


 * What's the change in URL? G .He (Talk!) 21:29, 24 April 2007 (UTC)


 * Using the pywikipediabot framework you could use replace.py to setup a regex replace which could be run through the entire wiki. For example if it was a domain name change from www.example.com to foo.bar.org:

python replace.py -family:runescape -start:! -regex "http://(www\.)?example\.com" "http://foo.bar.org"
 * Would replace links such as http://www.example.com, http://example.com, http://www.example.com/something with http://foo.bar.org, http://foo.bar.org, and http://foo.bar.org/something inside of the (main) namespace. Of course it's also possible to expand the replacements to do something such as only replace it if it's inside of the [] link tags. ~Dantman(talk) tricks Apr 24, 2007 @ 23:02 (UTC)

They changed the URL like this:

http://kbase.runescape.com/viewarticle.ws?article_id=1234

The new form of URL for knowledge base article "1234" is: http://www.runescape.com/kbase/viewarticle.ws?article_id=1234

Just a minor change, but all the links have an error message.--Richard (Talk - Contribs) 00:48, 25 April 2007 (UTC)


 * Run this function after you've setup a family file for your wiki (Use one of the ones I made for other Wikia at User:Dantman/Pywikipediabot as a base):

python replace.py -family:runescape -start:! "http://kbase.runescape.com/viewarticle.ws" "http://www.runescape.com/kbase/viewarticle.ws"
 * And that should replace the url's in the Main namespace. You'll half to replace the ! with something like Help: if you want to run it over another namespace after that. It would also be a good idea to get a bot flag for the account you create to do this. ~Dantman(talk) tricks Apr 25, 2007 @ 01:18 (UTC)