summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2022-11-21 12:03:06 +0200
committerYuval Adam <_@yuv.al>2022-11-21 12:03:06 +0200
commitc891cd7862bdb7af6bcac0c72f8561f592f6e5be (patch)
tree1baaca966c17364282bffcf7c0366268672583f4 /scripts
parentcf3280e780cc63d278532b46fef6b1f798b9d34e (diff)
Update consolidate
Diffstat (limited to 'scripts')
-rw-r--r--scripts/scan.py26
1 files changed, 20 insertions, 6 deletions
diff --git a/scripts/scan.py b/scripts/scan.py
index 5741622..c83d455 100644
--- a/scripts/scan.py
+++ b/scripts/scan.py
@@ -106,14 +106,28 @@ class NameScanner:
resps = await asyncio.gather(*tasks)
def find_homepages(self):
- count = 0
+ res = {}
for fn in listdir(DATA_DIR / "homepages"):
with open(DATA_DIR / "homepages" / fn, "r") as f:
- name = fn[:-5].replace(".", "")
- if name in f.read():
- count += 1
- print(name)
- print(count)
+ domain = fn[:-5]
+ name = domain.replace(".", "")
+ text = f.read()
+ nip = name in text
+ github = "github" in text
+ li = "linkedin" in text
+ sale = "for sale" in text or "register" in text or "parking" in text
+ res["domain"] = {
+ "name": name,
+ "name_in_page": nip,
+ "github": github,
+ "linkedin": li,
+ }
+ ge = "✅" if github else " "
+ le = "✅" if li else " "
+ ne = "✅" if nip else " "
+ se = "❌" if sale else " "
+ print(f"{name:20}{ne}{ge}{le}{se}")
+ print(len(res))
ns = NameScanner()