Explorer
/opt/struktur/AA-043-P34-R1-registry.py
← Zurück ↓ Download
import sqlite3,json
K='/opt/struktur/youtube-research/knowledge.db'; ids=[54,65,68,71,78,80,90,97,100,102,117,119,128,134,140,195,196,251,256,258,293,299,300,301,307,311,319]
c=sqlite3.connect('file:'+K+'?mode=ro',uri=True); c.row_factory=sqlite3.Row
q='select * from source_processing_registry where source_id in ('+','.join('?'*len(ids))+') order by cast(source_id as integer)'
for r in c.execute(q,tuple(map(str,ids))): print(json.dumps({k:(str(r[k])[:220] if isinstance(r[k],str) else r[k]) for k in r.keys()},ensure_ascii=False))
c.close()