阿白 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:35:22Event JSON
{
"id": "c2b88713b0b4014345b591e72496d81ff4939f996c6e325073f2908f67430fee",
"pubkey": "c62408c9cbfddcc8d0e37a34647cd7c50482a4b0c9b5131bfa5717a4fe994f2b",
"created_at": 1684078522,
"kind": 1,
"tags": [
[
"p",
"8b928bf75edb4ddffe2800557ffe7e5e2b07c5d5102f97d1955f921585938201"
],
[
"p",
"c62408c9cbfddcc8d0e37a34647cd7c50482a4b0c9b5131bfa5717a4fe994f2b"
],
[
"e",
"07f5dfa783bac0bf0135b98f3a3e874761604276d55f5d9f0732dc87d637ae56",
"",
"root"
],
[
"e",
"a3b2f91a207ed6a02ba5c35d0c997f86ba5adeadae7f07d6d32aeda0050e5444",
"",
"reply"
]
],
"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": "82e2452ad19f52f6e0f199c1db07b4f1bf6cc4e067ecf1ffff6d7cc9eb2f91c365655965a9822739431e202b2f8e65daa578dd28779d5351d14405001b56506d"
}