sec04: Jung CW9/1 — ✅ «Архетипы и коллективное бессознательное» АСТ 2019/2020, libgen 141693619

This commit is contained in:
Dmitry Kokorin 2026-09-08 23:06:59 +03:00
parent 4648eec468
commit cf85e3f1ad
33 changed files with 249 additions and 308 deletions

18
tools/cogito.sh Executable file
View file

@ -0,0 +1,18 @@
#!/bin/bash
# cogito-shop search: ./cogito.sh "query"
UA="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36"
q=$(python3 -c "import urllib.parse,sys;print(urllib.parse.quote(sys.argv[1]))" "$1")
curl -sL --max-time 30 -H "User-Agent: $UA" "https://cogito-shop.com/search/?q=$q" | python3 -c "
import re,sys
h = sys.stdin.read()
if 'ничего не найдено' in re.sub(r'<[^>]+>','',h):
print('(nothing found)')
seen=set()
for m in re.finditer(r'alt=\"([^\"]{8,140})\"', h):
t = m.group(1)
if t in seen or t in ('Telegram','YouTube','Top.Mail.Ru'): continue
seen.add(t)
print(' -', t)
for m in re.finditer(r'href=\"(/person/[^\"]+)\"', h):
print(' PERSON:', m.group(1))
"