Wednesday, July 15, 2020

Difference between "html.parser" vs "lxml"


1.     html.parser - BeautifulSoup(htmlmarkup, "html.parser")
    • Advantages: 
      • Batteries included
      • Decent speed
      • Built-in - no extra dependencies needed
      • Lenient (as of Python 2.7.3 and 3.2.)
    • Disadvantages: Not very lenient (before Python 2.7.3 or 3.2.2)

2.     lxml - BeautifulSoup(htmlmarkup, "lxml")
    • Advantages: 
      • Batteries included
      • Very fast
      • Lenient
      • Works well when webpage has broken HTML
    • Disadvantages: External C dependency




Documentation clearly mentioned. check this url here

No comments:

Post a Comment

Image noise comparison methods

 1. using reference image technique     - peak_signal_noise_ratio (PSNR)     - SSI 2. non-reference image technique     - BRISQUE python pac...