Spaces:
Sleeping
Sleeping
Create ingest/registry.py
Browse files- ingest/registry.py +14 -10
ingest/registry.py
CHANGED
|
@@ -1,20 +1,24 @@
|
|
| 1 |
from ingest.adapters.cia import CIAAdapter
|
| 2 |
-
from ingest.adapters.
|
| 3 |
-
from ingest.adapters.doj import DOJAdapter
|
| 4 |
-
from ingest.adapters.dhs import DHSAdapter
|
| 5 |
-
from ingest.adapters.state import StateDeptAdapter
|
| 6 |
|
| 7 |
-
def
|
| 8 |
adapters = [
|
| 9 |
CIAAdapter(),
|
| 10 |
-
FBIAdapter(),
|
| 11 |
-
DOJAdapter(),
|
| 12 |
-
DHSAdapter(),
|
| 13 |
-
StateDeptAdapter(),
|
| 14 |
]
|
| 15 |
-
|
| 16 |
return {
|
| 17 |
a.source_name: a
|
| 18 |
for a in adapters
|
| 19 |
if a.live and a.robots_allowed()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
}
|
|
|
|
| 1 |
from ingest.adapters.cia import CIAAdapter
|
| 2 |
+
from ingest.adapters.stub import StubAdapter
|
|
|
|
|
|
|
|
|
|
| 3 |
|
| 4 |
+
def get_live_adapters():
|
| 5 |
adapters = [
|
| 6 |
CIAAdapter(),
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
]
|
|
|
|
| 8 |
return {
|
| 9 |
a.source_name: a
|
| 10 |
for a in adapters
|
| 11 |
if a.live and a.robots_allowed()
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
def get_stub_adapters():
|
| 15 |
+
return {
|
| 16 |
+
"NSA": StubAdapter("NSA", "robots.txt blocks automated access"),
|
| 17 |
+
"NRO": StubAdapter("NRO", "no public electronic reading room"),
|
| 18 |
+
"SAP": StubAdapter("SAP", "special access programs are exempt"),
|
| 19 |
+
"TEN-CAP": StubAdapter("TEN-CAP", "no public FOIA search endpoint"),
|
| 20 |
+
"AATIP": StubAdapter("AATIP", "no standalone FOIA library"),
|
| 21 |
+
"Special Activities": StubAdapter("Special Activities", "intelligence protected"),
|
| 22 |
+
"DIA": StubAdapter("DIA", "robots.txt blocks automated access"),
|
| 23 |
+
"NGA": StubAdapter("NGA", "robots.txt blocks automated access"),
|
| 24 |
}
|