Revision: 4178
Author: cosoleto
Date: 2007-09-02 15:10:35 +0000 (Sun, 02 Sep 2007)
Log Message:
-----------
Added put()
Modified Paths:
--------------
trunk/pywikipedia/copyright.py
Modified: trunk/pywikipedia/copyright.py
===================================================================
--- trunk/pywikipedia/copyright.py 2007-09-02 12:51:10 UTC (rev 4177)
+++ trunk/pywikipedia/copyright.py 2007-09-02 15:10:35 UTC (rev 4178)
@@ -865,6 +865,18 @@
if output:
write_log('=== [[' + page.title() + ']] ===' + output
+ '\n', filename = output_file)
+def put(page, text, comment):
+ while True:
+ try:
+ page.put(text, comment = comment)
+ break
+ except wikipedia.SpamfilterError, url:
+ print "Spam filter"
+ text = re.sub(url[0], '<blacklist>' + url[0][7:], text)
+ except wikipedia.EditConflict:
+ print "Edit conflict"
+ raise wikipedia.EditConflict
+
def check_config(var, license_id, license_name):
if var:
if not license_id:
Show replies by date