A few utilities for the-law-factory-parser project, shared by senapy and anpy.
A simple caching library:
from lawfactory_utils.urls import enable_requests_cache, download enable_requests_cache() ..... resp = download(url) print(resp.text)
The cached responses are stored in the directory where this lib is installed. You can use lawfactory_where_is_my_cache to print the path.
URL cleaning for senat/AN/legifrance/conseil-constit
>>> from lawfactory_utils.urls import clean_url
>>> clean_url('https://www.legifrance.gouv.fr/eli/loi/2017/9/15/JUSC1715752L/jo/texte')
'https://www.legifrance.gouv.fr/affichTexte.do?cidTexte=JORFTEXT000035567936&categorieLien=id'
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file lawfactory_utils-0.0.3.tar.gz.
File metadata
- Download URL: lawfactory_utils-0.0.3.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a93a1e006e4dc9ff04edb7df043d982717c1431cd196c1b045f311b0ba7380e9
|
|
| MD5 |
e24c7df5cece203f215c720028998dcc
|
|
| BLAKE2b-256 |
0b57f711bf30b24699babc54fd9fd6ce4dfb6c69d1d527ebc2c25dc4b2358cce
|