Python package to scrape NRC Event Reports.
Project description
Set of modules to scrape Event Reports from the NRC.gov website.
#Tests
pytest
#Usage
url = 'https://www.nrc.gov/reading-rm/doc-collections/event-status/event/2005/20050606en.html'
e = EventNotificationReport.from_url(url, headers)
url2 = 'https://www.nrc.gov/reading-rm/doc-collections/event-status/event/2017/20171129en.html'
f = EventNotificationReport.from_url(url2, headers)
url3 = 'https://www.nrc.gov/reading-rm/doc-collections/event-status/event/2005/20050607en.html'
g = EventNotificationReport.from_url(url3, headers)
g.events #>>> [event, event, ...]
#categorical info
g.events[0].eci.info
#status info for power reactors
g.events[0].esi
#description info
g.events[0].edi
er_urls = generate_nrc_event_report_urls(2004,2019,only_known=False)
from random import sample
urls = sample(list(er_urls.values()), 10)
# loop the urls and skip any 404s
fetch_enrs(urls)
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
nrc-scrape-0.0.2.tar.gz
(7.2 kB
view hashes)
Built Distribution
Close
Hashes for nrc_scrape-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5578fa0adeeff3edf73d013940a73e6875d2e43808a4334234d9ba15ebbde2f6 |
|
MD5 | 794c9ceed0624465546597ebbdee5159 |
|
BLAKE2b-256 | b6561bd63cc68bf36cda3c50870ec9b7750a4030f26f8bb7b513e4ba8157cbe5 |