Revision: 7072
Author: alexsh
Date: 2009-07-15 21:32:58 +0000 (Wed, 15 Jul 2009)
Log Message:
-----------
self.site().linksearch: add API available check (too difficult to talk exception and
process when query.GetData work, list format will different if yeild linksearch again)
Modified Paths:
--------------
trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py 2009-07-15 21:05:47 UTC (rev 7071)
+++ trunk/pywikipedia/wikipedia.py 2009-07-15 21:32:58 UTC (rev 7072)
@@ -5810,6 +5810,13 @@
"""Yield Pages from results of Special:Linksearch for
'siteurl'."""
cache = []
R = re.compile('title
?=\"([^<>]*?)\">[^<>]*</a></li>')
+ #Check API can work
+ if config.use_api:
+ try:
+ d = self.api_address()
+ del d
+ except NotImplementedError:
+ config.use_api = False
urlsToRetrieve = [siteurl]
if not siteurl.startswith('*.'):
Show replies by date