Files
omni-parse/.local/diag7.py
Vlad Gothbreach 8de421b6af
Some checks failed
ci / test (3.10) (push) Has been cancelled
ci / test (3.11) (push) Has been cancelled
ci / test (3.12) (push) Has been cancelled
abuse: классификатор ловит панели/github/hn и мульти-теги, реальный total из индекса, кап API поднят до 3000
2026-10-27 01:28:28 +03:00

43 lines
2.2 KiB
Python

import sys, json
sys.path.insert(0, '.')
from concurrent.futures import ThreadPoolExecutor
from omni import feeds, net
from omni.sources import Source
C = [
("cisa_news", "https://www.cisa.gov/news-events/news/rss.xml", "rss", {}),
("fortinet_blog", "https://www.fortinet.com/blog/rss.xml", "rss", {}),
("mcafee_blogs", "https://www.mcafee.com/blogs/feed/", "rss", {}),
("avast_blog", "https://www.avast.com/en-us/blog/feed", "rss", {}),
("eset_press", "https://www.eset.com/int/about/newsroom/press-releases/feed/", "rss", {}),
("gti_threat_intel", "https://cloud.google.com/blog/topics/threat-intelligence/rss/", "rss", {}),
("checkpoint_blog", "https://www.checkpoint.com/blog/feed/", "rss", {}),
("anquanke_news", "https://www.anquanke.com/news", "html_listing", {"include_prefixes": ["/post/id/"]}),
("secrss_vuln", "https://www.secrss.com/articles", "html_listing", {"include_prefixes": ["/articles/"]}),
("bleeping_dup_check", "https://www.bleepingcomputer.com/feed/", "rss", {}),
("therecord_dup_check", "https://therecord.media/feed", "rss", {}),
("deepwatch_blog", "https://www.deepwatch.com/feed/", "rss", {}),
("huntress_alt", "https://www.huntress.com/blog/feed", "rss", {}),
("dragos_alt", "https://www.dragos.com/feed/", "rss", {}),
("scmedia_alt", "https://www.scmagazine.com/feed", "rss", {}),
("trendmicro_alt", "https://www.trendmicro.com/en_us/research/feed", "rss", {}),
("zscaler_alt", "https://www.zscaler.com/blogs/security-research/rss", "rss", {}),
("gbhackers_alt", "https://gbhackers.com/feed", "rss", {}),
("cybersecnews_alt", "https://cybersecuritynews.com/feed", "rss", {}),
]
def run(t):
name, url, ad, extra = t
src = Source(name=name, category="security", kind="rss", url=url, adapter=ad, tags=(), limit=5, extra=extra)
try:
r = net.get(url, timeout=25)
items = feeds.fetch(src, 5)
return {"name": name, "st": r.status, "n": len(items), "first": (items[0].title[:60] if items else "")}
except Exception as e:
return {"name": name, "n": 0, "err": str(e)[:70]}
with ThreadPoolExecutor(6) as ex:
for r in ex.map(run, C):
print(json.dumps(r, ensure_ascii=False))