A package for scrape case law informations.
Project description
UKLawCaseScraper
UKLawCaseScraper is a module, allows you to retrieve judgments and decisions information from 2003 onwards, from Find case law in a friendly, Pythonic way without having to solve CAPTCHAs.
Installation
UKLawCaseScraper can be installed with pip. To install using pip, simply run:
pip install UKLawCaseScraper
This package has 3 main modules:
- CaseInfoScraper
- CaseHeaderScraper
- FullTextScraper
- Save_to_json (For version <= 0.4.2)
In versions prior to 0.4.2, it is necessary to use the save_to_json function to manually save each output separately. However, starting from version 0.4.3, each output class automatically records its data to a JSON file.
1- CaseInfoScraper
This module contains 2 functions. These functions scrape Link, Name of the Case, judgment-listing__court, judgment-listing__neutralcitation and Datetime for a page or multipages. Funcrions:
- scrape_judgments
- scrape_all_judgments_info
- get_response
2- CaseHeaderScraper
This module has 3 functions. First module give us just page's urls that use in second and third functions. (So you have to run scrape_judgment_urls first) then, second function gives us direct download case's PDFs and the last one, scrape case header info :) Functions:
- scrape_judgment_urls
- judgment_Dlink
- scrape_header_info
- get_response
3- FullTextScraper
This module has 3 function. It gets output of scrape_header_info and scrape all text of each cases. Functions:
- load_json
- scrape_full_text_and_headers
- OutputScraper
- get_response
4- get_response
The get_response function is an essential component of the all classes. Here's an explanation of why it is included and its role in the class:
- Network Requests Handling
- Retry Mechanism
The get_response function is crucial for managing HTTP requests within the all classes. It ensures that web pages are fetched reliably, handles network errors gracefully, and retries requests when necessary. This design improves the robustness, maintainability, and readability of the scraper code.
More information in github repository page in UKLawCaseScraper
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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
File details
Details for the file UKLawCaseScraper-0.4.4.tar.gz.
File metadata
- Download URL: UKLawCaseScraper-0.4.4.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bcb67118fc5e47aa996f14cbc3513c22263f803a8044b339ea322057813874d9
|
|
| MD5 |
729dfc240ad224537a12746fbb3d44fc
|
|
| BLAKE2b-256 |
3002575f03edf6c40a00a6dad6cd6482ec0d33a879531a28497faee5750bf2bd
|
File details
Details for the file UKLawCaseScraper-0.4.4-py3-none-any.whl.
File metadata
- Download URL: UKLawCaseScraper-0.4.4-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2bd08001dfac25d0eadb66fde10caa32aef43c286d6d195b5d4622bfc07d3d60
|
|
| MD5 |
41758e22fac87549b595d12b7d9705d7
|
|
| BLAKE2b-256 |
ed683fc2a64fb954c1cf775f691f7b36c12d18b2bb954ccb3cbcabb2056010a5
|