Revision: 3959
Author: valhallasw
Date: 2007-08-03 18:21:15 +0000 (Fri, 03 Aug 2007)
Log Message:
-----------
Update: new test for ibegin: '<!-- start content -->'.
Modified Paths:
--------------
trunk/pywikipedia/catlib.py
Modified: trunk/pywikipedia/catlib.py
===================================================================
--- trunk/pywikipedia/catlib.py 2007-08-03 03:31:06 UTC (rev 3958)
+++ trunk/pywikipedia/catlib.py 2007-08-03 18:21:15 UTC (rev 3959)
@@ -201,8 +201,11 @@
try:
ibegin = txt.index('<div id="mw-pages">')
except ValueError:
- wikipedia.output("\nCategory page detection is not bug free.
Please report this error!")
- raise
+ try:
+ ibegin = txt.index('<!-- start content -->') # does
not work for cats without text
+ except ValueError:
+ wikipedia.output("\nCategory page detection is not bug free.
Please report this error!")
+ raise
# index where article listing ends
try:
iend = txt.index('<div class="printfooter">')
Show replies by date