精易论坛

标题: 解析分割,分别取出 [打印本页]

作者: ShenZz    时间: 2025-6-23 00:38
标题: 解析分割,分别取出
const fpsList = [{"ip": "119.39.5.93", "last_check_time": "2025-06-22 22:30:01", "port": "3128", "speed": 188, "location": "\u957f\u6c99\u5e02"}, {"ip": "121.230.8.243", "last_check_time": "2025-06-22 21:30:02", "port": "1080", "speed": 168, "location": "\u6cf0\u5dde\u5e02"}, {"ip": "117.92.234.144", "last_check_time": "2025-06-22 20:30:01", "port": "1080", "speed": 163, "location": "\u8fde\u4e91\u6e2f\u5e02"}, {"ip": "118.178.197.213", "last_check_time": "2025-06-22 19:30:02", "port": "3128", "speed": 143, "location": "\u676d\u5dde\u5e02"}, {"ip": "125.77.135.240", "last_check_time": "2025-06-22 18:30:02", "port": "80", "speed": 116, "location": "\u6cc9\u5dde\u5e02"}, {"ip": "171.105.22.54", "last_check_time": "2025-06-22 17:30:02", "port": "9909", "speed": 149, "location": "\u94a6\u5dde\u5e02"}, {"ip": "115.231.181.40", "last_check_time": "2025-06-22 16:30:03", "port": "8128", "speed": 193, "location": "\u5b81\u6ce2\u5e02"}, {"ip": "139.159.97.42", "last_check_time": "2025-06-22 15:30:01", "port": "8788", "speed": 134, "location": "\u65e0\u9521\u5e02"}, {"ip": "182.204.182.96", "last_check_time": "2025-06-22 14:30:02", "port": "1080", "speed": 257, "location": "\u8425\u53e3\u5e02"}, {"ip": "121.230.8.243", "last_check_time": "2025-06-22 13:30:03", "port": "1080", "speed": 273, "location": "\u6cf0\u5dde\u5e02"}, {"ip": "114.80.36.171", "last_check_time": "2025-06-22 12:30:02", "port": "3081", "speed": 123, "location": "\u4e0a\u6d77\u5e02"}, {"ip": "112.74.173.47", "last_check_time": "2025-06-22 11:30:03", "port": "8837", "speed": 211, "location": "\u6df1\u5733\u5e02"}];

IP  端口   匿名度  响应时间  最后验证时间        "\u4e0a\u6d77\u5e02"这种需要 usc2转ansi解码 才能正常显示

来个老哥给分割一下,搞了一小时了没搞好。  取不全


补充内容 (2025-6-23 02:20):
删贴   自己搞好了
作者: 菜鸟囚徒    时间: 2025-6-23 00:38
[09:58:10] * “119.39.5.93” | “2025-06-22 22:30:01” | “3128” | “188” | “第1组”
[09:58:10] * “121.230.8.243” | “2025-06-22 21:30:02” | “1080” | “168” | “第2组”
[09:58:10] * “117.92.234.144” | “2025-06-22 20:30:01” | “1080” | “163” | “第3组”
[09:58:10] * “118.178.197.213” | “2025-06-22 19:30:02” | “3128” | “143” | “第4组”
[09:58:10] * “125.77.135.240” | “2025-06-22 18:30:02” | “80” | “116” | “第5组”
[09:58:10] * “171.105.22.54” | “2025-06-22 17:30:02” | “9909” | “149” | “第6组”
[09:58:10] * “115.231.181.40” | “2025-06-22 16:30:03” | “8128” | “193” | “第7组”
[09:58:10] * “139.159.97.42” | “2025-06-22 15:30:01” | “8788” | “134” | “第8组”
[09:58:10] * “182.204.182.96” | “2025-06-22 14:30:02” | “1080” | “257” | “第9组”
[09:58:10] * “121.230.8.243” | “2025-06-22 13:30:03” | “1080” | “273” | “第10组”
[09:58:10] * “114.80.36.171” | “2025-06-22 12:30:02” | “3081” | “123” | “第11组”
[09:58:10] * “112.74.173.47” | “2025-06-22 11:30:03” | “8837” | “211” | “第12组”


.版本 2
.支持库 spec

.局部变量 str, 文本型
.局部变量 str_arg, 文本型, , "0"
.局部变量 num, 整数型
.局部变量 i, 整数型
.局部变量 temp, 文本型
.局部变量 json, 类_json

str = 文本_取出中间文本 (#常量1, “[”, “]”, , )
str_arg = 分割文本 (str, “}, {”, )

num = 取数组成员数 (str_arg)
.计次循环首 (num, i)
    temp = str_arg [i]
    temp = 文本_替换 (temp, , , , “{”, “”, “}”, “”, , , , , , )
    temp = “{” + temp + “}”
    json.解析 (temp, , )
    调试输出 (json.取通用属性 (“ip”, ), json.取通用属性 (“last_check_time”, ), json.取通用属性 (“port”, ), json.取通用属性 (“speed”, ), “第” + 到文本 (i) + “组”)
    json.清除 ()
.计次循环尾 ()


作者: 熬夜    时间: 2025-6-23 10:03
人不能太懒 1111.e (924.57 KB, 下载次数: 2)
作者: 影纸    时间: 2025-6-23 10:17
  
变量名类 型静态数组备 注
json类_json 
i整数型 
IP文本型 
端口文本型 
最后验证时间文本型 
匿名度文本型 
json.解析 ( #常量2, , )
计次循环首 (json.成员数 (), i)
IP = json.取通用属性 (“[”到文本 (i - 1)“].ip”, )
端口 = json.取通用属性 (“[”到文本 (i - 1)“].port”, )
最后验证时间 = json.取通用属性 (“[”到文本 (i - 1)“].last_check_time”, )
匿名度 = 编码_usc2到ansi (json.取通用属性 (“[”到文本 (i - 1)“].location”, ))
调试输出 (“IP”, IP, “端口”, 端口, “匿名度”, 匿名度, “最后验证时间”, 最后验证时间)
计次循环尾 ()


i支持库列表   支持库注释   
spec特殊功能支持库


* “IP” | “119.39.5.93” | “端口” | “3128” | “匿名度” | “长沙市” | “最后验证时间” | “2025-06-22 22:30:01”
* “IP” | “121.230.8.243” | “端口” | “1080” | “匿名度” | “泰州市” | “最后验证时间” | “2025-06-22 21:30:02”
* “IP” | “117.92.234.144” | “端口” | “1080” | “匿名度” | “连云港市” | “最后验证时间” | “2025-06-22 20:30:01”
* “IP” | “118.178.197.213” | “端口” | “3128” | “匿名度” | “杭州市” | “最后验证时间” | “2025-06-22 19:30:02”
* “IP” | “125.77.135.240” | “端口” | “80” | “匿名度” | “泉州市” | “最后验证时间” | “2025-06-22 18:30:02”
* “IP” | “171.105.22.54” | “端口” | “9909” | “匿名度” | “钦州市” | “最后验证时间” | “2025-06-22 17:30:02”
* “IP” | “115.231.181.40” | “端口” | “8128” | “匿名度” | “宁波市” | “最后验证时间” | “2025-06-22 16:30:03”
* “IP” | “139.159.97.42” | “端口” | “8788” | “匿名度” | “无锡市” | “最后验证时间” | “2025-06-22 15:30:01”
* “IP” | “182.204.182.96” | “端口” | “1080” | “匿名度” | “营口市” | “最后验证时间” | “2025-06-22 14:30:02”
* “IP” | “121.230.8.243” | “端口” | “1080” | “匿名度” | “泰州市” | “最后验证时间” | “2025-06-22 13:30:03”
* “IP” | “114.80.36.171” | “端口” | “3081” | “匿名度” | “上海市” | “最后验证时间” | “2025-06-22 12:30:02”
* “IP” | “112.74.173.47” | “端口” | “8837” | “匿名度” | “深圳市” | “最后验证时间” | “2025-06-22 11:30:03”







欢迎光临 精易论坛 (https://125.confly.eu.org/) Powered by Discuz! X3.4