Declarative Scraping Tools
Project description
LST
Declarative Scraping Tools
Fetch - get content (requests library)
Scan - select tags by css selector (bs4 library)
Example
from lst import Fetch, Scan
parser = Fetch() >> Scan('a') >> Fetch() >> {'h1': Scan('h1'), 'h5': Scan('h5')}
for res in parser('http://some.site'):
if 'h1' in res:
tag = res['h1']
print('H1', tag.get_text())
if 'h5' in res:
tag = res['h5']
print('H5', tag.get_text())
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
lst-0.4.0-py3-none-any.whl
(2.8 kB
view details)
File details
Details for the file lst-0.4.0-py3-none-any.whl.
File metadata
- Download URL: lst-0.4.0-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26ffaf26383ebed2c60d7818bfcbc3353b60f20296d0b6eb01e7d829268a9dda
|
|
| MD5 |
8530b4143225117cb276ca84b3c9d440
|
|
| BLAKE2b-256 |
a26bfdc8a482be58c0ac2dfdc3b1362ff14612c61318811daf61b7d8cdc0a6f4
|