Skip to content

LxmlSoup is an analogue of BeautifulSoup, containing the most basic and necessary methods. Its speed exceeds bs4 by 2 times. The syntax is the same.

License

Notifications You must be signed in to change notification settings

Thread554/LxmlSoup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LxmlSoup

LxmlSoup is an analogue of BeautifulSoup, containing the most basic and necessary methods. Its speed exceeds bs4 by 5 times. The syntax is the same.

0.020386695861816406 - LxmlSoup
0.10153651237487793 - BeautifulSoup

Installation

LxmlSoup requires Python >= 3.7

Install with pip from PyPI:

pip install LxmlSoup

Or cloning the repository:

git clone git@github.com:gladkihaa-28/LxmlSoup.git

Examples

from LxmlSoup import LxmlSoup
import requests

html = requests.get('https://sunlight.net/catalog').text
soup = LxmlSoup(html)

links = soup.find_all('a', class_='cl-item-img cl-item-img_loaded')
for link in links:
    print(link.text(), link.get('href'))
from LxmlSoup import LxmlSoup
import requests

html = requests.get('https://sunlight.net/catalog').text
soup = LxmlSoup(html)

links = soup.find_all('a', attrs={'itemprop': 'url'})
for link in links:
    print(link.text(), link.get('href'))

You can support the author so that updates come out more often. Sberbank - 2202 2062 9710 1995

About

LxmlSoup is an analogue of BeautifulSoup, containing the most basic and necessary methods. Its speed exceeds bs4 by 2 times. The syntax is the same.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published