15 lines
539 B
Python
15 lines
539 B
Python
import re
|
|
|
|
import certifi
|
|
import httpx
|
|
|
|
url = "https://skills.sh/vercel-labs/skills/find-skills"
|
|
r = httpx.get(url, headers={"User-Agent": "Mozilla/5.0"}, timeout=20, verify=certifi.where())
|
|
chunks = re.findall(r'self\.__next_f\.push\(\[1,"(.*?)"\]\)', r.text, re.DOTALL)
|
|
blob = "\n".join(chunks).encode("utf-8").decode("unicode_escape", errors="ignore")
|
|
for needle in ("description", "Helps users", "SKILL.md", "summary"):
|
|
print(needle, blob.count(needle))
|
|
idx = blob.find("Helps users")
|
|
if idx >= 0:
|
|
print(blob[idx : idx + 300])
|