def _parse_page(self, html): text = '' #html = html.replace('\n', '') html = ' '.join(html).replace('\n', ' ').replace('\r', '') f = open('kala', 'w') f.write(html) f.close #r = re.compile('(.*?)
(*.?)
(.*?)(.*?)(.*?)') r = re.compile('(.*?)(.*?)(.*?)') m = r.match(html) if m: #header = m.group(2) body = m.group(2) else: body = '' r = re.compile('(.*?)<(.*?)>(.*?)') m = r.match(body) if m.groups(): for n in m.groups() t = m.group(1) #text += t print 'payload: ', t return text