A thin, incomplete Python 3 library wrapper around the Texas Legislature Online Bill Search.
Install and Test
$ pip install txbillsearch
...
$ python -m txbillsearch
3 bills found...
result 1 of 3: HB 20 by Capriglione H Filed 2019-01-24
result 2 of 3: HB 1096 by Capriglione H Filed 2019-01-25
result 3 of 3: HJR 10 by Capriglione H Filed 2019-01-24
The next page of results is None
$
Usage
import txbillsearch
capriglione_finance = 'https://capitol.texas.gov/Search/BillSearch.aspx?NSP=3&SPL=True&SPC=False&SPA=True&SPS=True&Leg=86&Sess=R&ChamberH=True&ChamberS=True&BillType=B;JR;CR;R;;;&AuthorCode=A2345&SponsorCode=&ASAndOr=O&IsPA=True&IsJA=False&IsCA=False&IsPS=True&IsJS=False&IsCS=False&CmteCode=&CmteStatus=&OnDate=&FromDate=&ToDate=&FromTime=&ToTime=&LastAction=False&Actions=H001;S001;&AAO=O&Subjects=I0747;I0748;&SAO=O&TT=&ID=abcDEFghi'
search = txbillsearch.Search(capriglione_finance)
for index, bill in enumerate(search.results):
print(f'result {index+1} of {search.result_count}: {bill}')
Technical Details
For some reason, BillSearchResults.aspx requires that you supply an ID, generated on BillSearch.aspx. This ID must be "fresh"; that is it must have been generated less than 24-ish hours ago (I don't know the exact time interval). Without a "fresh" ID, BillSearchResults.aspx displays "No bills were found matching the entered search criteria." or redirects the client back to BillSearch.aspx. The ID is associated with the search criteria you supply on BillSearch.aspx, so it cannot be reused with other searches on BillSearchResults.aspx alone.
This ID is generated during the ASP.NET POSTback that occurs to BillSearch.aspx after you have selected your search criteria, but before you are redirected to BillSearchResults.aspx:
Disclaimer
I made my best effort to read through the Texas Legislature Online Terms and Conditions, and found nothing that prohibited or discouraged automated/programmatic use or access of this information for personal and/or non-commercial use. The FTP site is no substitute for a modern web service. If there's a better way to do this (e.g., a real web service) I'd love to know about it, and would much prefer to use it to the wasteful and inconvenient method developed herein.
Metadata
Release files for txbillsearch 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| txbillsearch-0.1.9.tar.gz | 11.6 kB | Without provenance | Details for txbillsearch-0.1.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| txbillsearch-0.1.9-py3-none-any.whl | Python 3 | none | any | Details for txbillsearch-0.1.9-py3-none-any.whl |
Total release size: 26.8 kB
Release files / txbillsearch-0.1.9.tar.gz
| Download URL | txbillsearch-0.1.9.tar.gz |
|---|---|
| Size | 11.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5d37b563f27ee70077d0814d6562ac9e4e2d5f885a8d53807fbc69d38f2ad715
|
|
BLAKE2b-256 checksum How to use checksums |
ee8bfb0ded9dab012041b0ad77151732f368eb2d54d9882c5846645ae3a358d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.7
|
Release files / txbillsearch-0.1.9-py3-none-any.whl
| Download URL | txbillsearch-0.1.9-py3-none-any.whl |
|---|---|
| Size | 15.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4d6706cb4ec48fd2dfd11cfd14b936847648f95dbe3c549fc7e842ccb75a04c9
|
|
BLAKE2b-256 checksum How to use checksums |
eda9c8f0fbb44167c2eba5ac808377a056bceba9176e36c74eacc2887635c5d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.7
|
Security for txbillsearch 0.1.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.