Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
kimagure
on March 10, 2013
|
parent
|
context
|
favorite
| on:
Web Scraping 101 with Python
PyQuery seems to always be faster in my experience than BS4 (for ripping the same information). Anyone else have a similar experience?
chewxy
on March 10, 2013
[–]
Only on wellformed pages. There are many many many many many malformed pages on the internet. Even those that are created in 2013
ville
on March 10, 2013
|
parent
[–]
Fortunately HTML5 defined a standard way to parse even broken HTML and that parser is implemented in html5lib package. You can use it also with lxml and even use "jQuery like" selectors with lxml.cssselect (
http://lxml.de/cssselect.html
)
Consider applying for YC's Fall 2026 batch!
Applications
are open till July 27.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: