$ diff -Naur ~kandinski/atocha/modules/drae.py modules/drae.py
--- /home/kandinski/atocha/modules/drae.py Tue Dec 13 02:46:52 2005
+++ modules/drae.py Tue Dec 13 22:33:01 2005
@@ -7,12 +7,11 @@
import web
r_tag = re.compile(r'<[^>]+>')
-r_lema = re.compile(r'(.*?)')
-r_etim = re.compile(r'(.*?)')
+r_lema = re.compile(r'(?m)(.*?)')
+r_etim = re.compile(r'(?m)(.*?)')
r_digit = re.compile(r'\d+\.')
# r_tilde = re.compile(r'~\.') # lemas complejos
-
def unescape(s):
s = s.replace('>', '>')
s = s.replace('<', '<')
@@ -36,7 +35,9 @@
uri1 = "http://buscon.rae.es/draeI/SrvltObtenerHtml?TIPO_HTML=2&LEMA="
uri2 = "&SUPIND=0&CAREXT=10000&NEDIC=No#0_1"
uri = uri1 + urify(word) + uri2 # should write urify(word), really
+ self.msg(origin.sender, "Getting %s" % uri)
s = web.get(uri)
+ self.msg(origin.sender, "Got it!")
lema = getAndStrip(r_lema, s)
etim = getAndStrip(r_etim, s)
@@ -54,5 +55,5 @@
self.msglines(origin.sender, mas_en)
f_drae.rule = r'^\.drae (.*)$'
-f_drae.thread = True
+# f_drae.thread = True