GodsDevProject commited on
Commit
e57e1ea
·
verified ·
1 Parent(s): a1fdc31

Delete fbi_vault.py

Browse files
Files changed (1) hide show
  1. fbi_vault.py +0 -29
fbi_vault.py DELETED
@@ -1,29 +0,0 @@
1
- import requests
2
- from bs4 import BeautifulSoup
3
-
4
- def ingest_fbi_vault(url: str) -> dict:
5
- r = requests.get(url, timeout=10)
6
- r.raise_for_status()
7
- soup = BeautifulSoup(r.text, "html.parser")
8
-
9
- text = soup.get_text(separator=" ", strip=True)
10
- title = soup.find("h1")
11
-
12
- return {
13
- "source": "FBI Vault",
14
- "agency": "FBI",
15
- "url": url,
16
- "title": title.text if title else "FBI Vault Document",
17
- "text": text[:10000]
18
- }(r.text, "html.parser")
19
-
20
- title = soup.find("h1")
21
- body = soup.get_text(separator=" ", strip=True)
22
-
23
- return {
24
- "source": "FBI Vault",
25
- "url": url,
26
- "title": title.text if title else "Untitled FBI Vault Document",
27
- "text": body,
28
- "agency": "FBI"
29
- }