Timeline for HTML parser written with the Python 3 standard lib
Current License: CC BY-SA 3.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 15, 2017 at 2:45 | history | edited | Jamal | CC BY-SA 3.0 |
deleted 36 characters in body; edited title
|
Dec 14, 2017 at 16:15 | history | edited | Ricky Wilson | CC BY-SA 3.0 |
Added HTMLParser source code.
|
Dec 14, 2017 at 14:37 | answer | added | alecxe | timeline score: 1 | |
Dec 14, 2017 at 14:09 | comment | added | Ricky Wilson | I. Can't use third party libs or I would use lxml and requests or scrappy. | |
Dec 14, 2017 at 12:44 | comment | added | Luke |
Can you use requests ?
|
|
Dec 14, 2017 at 9:51 | comment | added | Ricky Wilson |
I tried overriding the error() and it prevents the errors but stops parsing the page. I think I'm getting closer.
|
|
Dec 14, 2017 at 9:23 | comment | added | Ricky Wilson |
I tried monkey patching handle_startendtag() with a decorator that will cause the decorated method to ignore any errors but that didn't work at all.
|
|
Dec 14, 2017 at 7:45 | comment | added | Ricky Wilson |
I wonder if I could just monkey patch handle_starttag() to ignore errors.
|
|
Dec 14, 2017 at 7:39 | comment | added | Ricky Wilson |
Now I'm having the same problem I was having with xml.mimidom . I'm getting errors because of broken html. It seems the standard library doesn't have a method that will parse broken html. I will have to look at the source for html.parse.HTMLParser and see if I can monkey patch it to ignore errors . Ignore my last comment
|
|
Dec 14, 2017 at 7:32 | comment | added | Ricky Wilson | Now I'm having the same problem I was having with XML.mimidom. I'm getting errors because of broken html. It seems the standard library doesn't have a method that will parse broken html. I will have to look at the source for `htm | |
Dec 14, 2017 at 6:53 | history | asked | Ricky Wilson | CC BY-SA 3.0 |