阿白 on Nostr: 需要一个Python脚本来处理数据, ...
需要一个Python脚本来处理数据, 作为参数输入的nostr_id_public_keys_china_users.txt 文件的每一行为一个公钥id,需要读取每一行公钥id作为参数,比如 db11b32009d914dd76bd904b8a636627d1d9043f2a4f9ecaf6aaf85d05c5f7af ,拼接命令为 echo '["REQ", "cn", {"authors": ["db11b32009d914dd76bd904b8a636627d1d9043f2a4f9ecaf6aaf85d05c5f7af"] , "kinds": [1], "limit": 1}]'|nostcat wss://offchain.pub|jq '.[2].created_at' , 执行命令将获得的时间戳结果跟当前时间比较 ,如果小于30天则将公钥id 添加输出到 nostr_crawler_live_zh_users_list.txt 文件里,并依次循环执行。
Published at
2023-05-14 15:25:37Event JSON
{
"id": "d784d0909889de50a916870bfa1197fe00730a66e3b2352cefc738a84e63221a",
"pubkey": "c62408c9cbfddcc8d0e37a34647cd7c50482a4b0c9b5131bfa5717a4fe994f2b",
"created_at": 1684077937,
"kind": 1,
"tags": [
[
"e",
"c63a3fd8e87cb28e732d45827dc3e4dee60004808127226bf28b8836647b521b",
""
],
[
"e",
"1c6b510c23c19e1bba66eb05eb317a8be84c776728aca9506fa3e21080916237"
],
[
"p",
"8b928bf75edb4ddffe2800557ffe7e5e2b07c5d5102f97d1955f921585938201"
],
[
"p",
"5c10ed0678805156d39ef1ef6d46110fe1e7e590ae04986ccf48ba1299cb53e2"
]
],
"content": "需要一个Python脚本来处理数据, 作为参数输入的nostr_id_public_keys_china_users.txt 文件的每一行为一个公钥id,需要读取每一行公钥id作为参数,比如 db11b32009d914dd76bd904b8a636627d1d9043f2a4f9ecaf6aaf85d05c5f7af ,拼接命令为 echo '[\"REQ\", \"cn\", {\"authors\": [\"db11b32009d914dd76bd904b8a636627d1d9043f2a4f9ecaf6aaf85d05c5f7af\"] , \"kinds\": [1], \"limit\": 1}]'|nostcat wss://offchain.pub|jq '.[2].created_at' , 执行命令将获得的时间戳结果跟当前时间比较 ,如果小于30天则将公钥id 添加输出到 nostr_crawler_live_zh_users_list.txt 文件里,并依次循环执行。",
"sig": "29d38fbdcb97f6ba523526d55bb0d024ea9f41e2031a29f4b2f1ad6c398d7cb57aabc97a84850b4c4be619bf274154f836563ac9894b6feb61a17d7e7420d540"
}