I dont know much about html... How do you remove just text from the page? For example if the html page reads as:
<meta name="title" content="How can I make money at home online? No gimmacks please? - Yahoo! Answers">
<title>How can I make money at home online? No gimmicks please? - Yahoo! Answers</title>
I just want to extract this.
How can I make money at home online? No gimmicks please? - Yahoo! Answers
I am using re function:
def striphtml(data):
p = re.compile(r'<.*?>')
return p.sub(' ',data)
but still it's not doing what I intend it to do..?
The above function is called as:
for lines in filehandle.readlines():
#k = str(section[6].strip())
myFile.write(lines)
lines = striphtml(lines)
content.append(lines)