diff options
author | jim <jim@38b22f21-9aea-0310-abfc-843a9883df58> | 2008-09-02 07:20:27 (GMT) |
---|---|---|
committer | jim <jim@38b22f21-9aea-0310-abfc-843a9883df58> | 2008-09-02 07:20:27 (GMT) |
commit | f25b1af843ab5e04904e63c7edb6874f283c3d0f (patch) | |
tree | adff7b4fec1d7e1af6ca7ff8c791b2f475df7046 | |
parent | af8cb18d8f251b098ab35081df590338ba6dc66d (diff) |
wikiarticle: remove protected icon and needs citiations box
git-svn-id: https://exe.svn.sourceforge.net/svnroot/exe/trunk@3559 38b22f21-9aea-0310-abfc-843a9883df58
-rw-r--r-- | exe/engine/wikipediaidevice.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/exe/engine/wikipediaidevice.py b/exe/engine/wikipediaidevice.py index c48fcdb..7fb308b 100644 --- a/exe/engine/wikipediaidevice.py +++ b/exe/engine/wikipediaidevice.py @@ -112,12 +112,18 @@ within Wikipedia.""") content = soup.first('div', {'id': "content"}) # remove the wiktionary, wikimedia commons, and categories boxes + # and the protected icon and the needs citations box if content: infoboxes = content.findAll('div', {'class' : 'infobox sisterproject'}) [infobox.extract() for infobox in infoboxes] catboxes = content.findAll('div', {'id' : 'catlinks'}) [catbox.extract() for catbox in catboxes] + amboxes = content.findAll('table', + {'class' : re.compile(r'.*\bambox\b.*')}) + [ambox.extract() for ambox in amboxes] + protecteds = content.findAll('div', {'id' : 'protected-icon'}) + [protected.extract() for protected in protecteds] else: content = soup.first('body') |