Mobile app version of vmapp.org
Login or Join
Phylliss660

: How can I delete all Wiki pages created by spammers except mine in MediaWiki? I Implemented a MediaWiki site but unfortunately somebody created thousands of pages through thousand of users. Which

@Phylliss660

Posted in: #Mediawiki #Sql #Wiki

I Implemented a MediaWiki site but unfortunately somebody created thousands of pages through thousand of users.

Which query could I run for deleting all pages created by these users except mine?

MediaWiki pages are in wiki_page and wiki_text inside MediaWiki database but there is no field about who created those pages.

Largest table:


wiki_text: 682MB
wiki_externallinks: 162.5 MB
wiki_recentchange: 95 MB
wiki_page: 43 MB

Here, I find a possible answer to my problem but I'm blocked at the first step:


"Export articles created by you (presumably logged in as the WikiSysop user or similar)"

How can I export article made by me if in the table there is no field about user who created pages?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Phylliss660

1 Comments

Sorted by latest first Latest Oldest Best

 

@Deb1703797

If you know some Python (or are not afraid to learn) you should approach this with pywikibot.

You can loop through wiki.allpages() and you can add some logic to decide whether to delete a page or not. Good criteria:


Does the page contain specific words? E.g. related to drugs or porn.
Does the page have wikilinks to other pages?
Does the page have links from other pages?


(I can add a couple of Python lines here if there's any interest. Just let me know.)

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme