This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Modification HTMLParser.py
Type: resource usage Stage:
Components: None Versions: Python 2.4
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: diegorubenarias, facundobatista
Priority: normal Keywords:

Created on 2007-12-19 20:05 by diegorubenarias, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
HTMLParser.py diegorubenarias, 2007-12-19 20:05
unnamed diegorubenarias, 2007-12-19 20:07
HTMLParser.py diegorubenarias, 2007-12-19 20:07
Messages (3)
msg58821 - (view) Author: diego (diegorubenarias) Date: 2007-12-19 20:05
Hello my name is Diego, I needed to parse HTML to retrieve only text,
but not grasped how to do it with class HTMLParser, so the change to do
it. The code to use is:
class ParsearHTML (HTMLParser.HTMLParser):

    def __init__(self,datos):
        HTMLParser.HTMLParser.__init__(self)
        self.feed(datos)
        self.close()

    def handle_data(self,data):
        return data

parser  = ParsearHTML(onTmp)
data = parser.feed(onTmp)
And changes in the class are attached. Thank you very much. Diego.
msg58823 - (view) Author: diego (diegorubenarias) Date: 2007-12-19 20:07
---------- Forwarded message ----------
From: diego <report@bugs.python.org>
Date: 19-dic-2007 17:05
Subject: [issue1663] Modification HTMLParser.py
To: diego.arias@gmail.com

New submission from diego:

Hello my name is Diego, I needed to parse HTML to retrieve only text,
but not grasped how to do it with class HTMLParser, so the change to do
it. The code to use is:
class ParsearHTML (HTMLParser.HTMLParser):

    def __init__(self,datos):
        HTMLParser.HTMLParser.__init__(self)
        self.feed(datos)
        self.close()

    def handle_data(self,data):
        return data

parser  = ParsearHTML(onTmp)
data = parser.feed(onTmp)
And changes in the class are attached. Thank you very much. Diego.

----------
components: None
files: HTMLParser.py
messages: 58821
nosy: diegorubenarias
severity: normal
status: open
title: Modification HTMLParser.py
type: resource usage
versions: Python 2.4
Added file: http://bugs.python.org/file9000/HTMLParser.py

__________________________________
Tracker <report@bugs.python.org>
<http://bugs.python.org/issue1663>
__________________________________
msg58868 - (view) Author: Facundo Batista (facundobatista) * (Python committer) Date: 2007-12-20 11:49
This is not a bug, just a comment of a code you did.

If you think that there's actually a problem in HTMLParser.py, tell us
what you do, what you get, and what you expect to get.

When submitting changes, it's very useful to send the diff only, as in a
patch.

Thanks!
History
Date User Action Args
2022-04-11 14:56:29adminsetgithub: 46004
2007-12-20 11:49:43facundobatistasetstatus: open -> closed
resolution: not a bug
messages: + msg58868
nosy: + facundobatista
2007-12-19 20:07:19diegorubenariassetfiles: + unnamed, HTMLParser.py
messages: + msg58823
2007-12-19 20:05:21diegorubenariascreate