Function
get_xs
(source_note_id, cursor=None)
Source from the content-addressed store, hash-verified
| 36 | |
| 37 | |
| 38 | def get_xs(source_note_id, cursor=None): |
| 39 | if cursor is None: |
| 40 | cursor = '' |
| 41 | with open('js_signature/xs20230531.js', 'r', encoding='utf-8') as f: |
| 42 | js = f.read() |
| 43 | crt = execjs.compile(js) |
| 44 | xs_xt = crt.call('get_xs', f'/api/sns/web/v2/comment/page?note_id={source_note_id}&cursor={cursor}') |
| 45 | xs_xt['X-t'] = str(xs_xt['X-t']) |
| 46 | headers.update(xs_xt) |
| 47 | |
| 48 | |
| 49 | def get_comment(source_note_id): |
Tested by
no test coverage detected