Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modification HTMLParser.py #46004

Closed
diegorubenarias mannequin opened this issue Dec 19, 2007 · 3 comments
Closed

Modification HTMLParser.py #46004

diegorubenarias mannequin opened this issue Dec 19, 2007 · 3 comments
Labels
performance Performance or resource usage

Comments

@diegorubenarias
Copy link
Mannequin

diegorubenarias mannequin commented Dec 19, 2007

BPO 1663
Nosy @facundobatista
Files
  • HTMLParser.py
  • unnamed
  • HTMLParser.py
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2007-12-20.11:49:43.402>
    created_at = <Date 2007-12-19.20:05:21.124>
    labels = ['invalid', 'performance']
    title = 'Modification HTMLParser.py'
    updated_at = <Date 2007-12-20.11:49:43.360>
    user = 'https://bugs.python.org/diegorubenarias'

    bugs.python.org fields:

    activity = <Date 2007-12-20.11:49:43.360>
    actor = 'facundobatista'
    assignee = 'none'
    closed = True
    closed_date = <Date 2007-12-20.11:49:43.402>
    closer = 'facundobatista'
    components = ['None']
    creation = <Date 2007-12-19.20:05:21.124>
    creator = 'diegorubenarias'
    dependencies = []
    files = ['9000', '9002', '9003']
    hgrepos = []
    issue_num = 1663
    keywords = []
    message_count = 3.0
    messages = ['58821', '58823', '58868']
    nosy_count = 2.0
    nosy_names = ['facundobatista', 'diegorubenarias']
    pr_nums = []
    priority = 'normal'
    resolution = 'not a bug'
    stage = None
    status = 'closed'
    superseder = None
    type = 'resource usage'
    url = 'https://bugs.python.org/issue1663'
    versions = ['Python 2.4']

    @diegorubenarias
    Copy link
    Mannequin Author

    diegorubenarias mannequin commented Dec 19, 2007

    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.

    @diegorubenarias diegorubenarias mannequin added the performance Performance or resource usage label Dec 19, 2007
    @diegorubenarias
    Copy link
    Mannequin Author

    diegorubenarias mannequin commented Dec 19, 2007

    ---------- Forwarded message ----------
    From: diego <report@bugs.python.org>
    Date: 19-dic-2007 17:05
    Subject: [bpo-1663] 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\>


    @facundobatista
    Copy link
    Member

    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!

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    performance Performance or resource usage
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant