A package for getting getting Australian legal data from various sources with cache support.
Project description
Legal Data
A package for crawling Australian legal data from legislation.com.au and austlii.edu.au with cache support.
Please be respectful of server host resources by using a reasonable crawl delay, honouring robots.txt and crawling at times when the server load is lighter.
Install from PyPi
pip install legaldata
legislation.com.au example
This example will crawl Commonwealth Acts from legislation.com.au and copy files (docx, pdf, zip) to the save path.
from legaldata.legislation.crawler import ActCrawler
crawler = ActCrawler()
save_path = "./legislation.com.au/"
for index_url in crawler.get_index_pages():
acts = crawler.get_acts_from_index(index_url, save_path)
austlii.edu.au example
This example will crawl Commonwealth Acts from austlii.edu.au/ and copy files (rtf, txt) to the save path.
from legaldata.austlii.crawler import ActCrawler
crawler = ActCrawler()
save_path = "./austlii.edu.au/"
for index_url in crawler.get_index_pages():
acts = crawler.get_acts_from_index(index_url, save_path)
Legal Data is distributed under the MIT license.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
legaldata-0.1.1.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for legaldata-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf69e5a2d1b35091da6e8414f536a0996a76cda76adeed2ae449d2e8452ac626 |
|
MD5 | c458eb7a6fd88aeab6a94e5275675069 |
|
BLAKE2b-256 | 3a756c3bcd3724c627b3994f14d26d6d031c135c42281adee230990461605673 |