🔄 卡若AI 同步 2026-03-15 07:05 | 更新:水桥平台对接、运营中枢、运营中枢工作台 | 排除 >20MB: 11 个
This commit is contained in:
@@ -4,8 +4,8 @@ description: 《一场soul的创业实验》内容与运营统一入口——写
|
||||
triggers: Soul创业实验、写Soul文章、写授文章、Soul派对写文章、第9章写文章、写soul场次、soul文章规则、Soul文章上传、Soul派对文章、第9章上传、soul上传、写soul文章、运营报表、派对填表、派对纪要
|
||||
owner: 水桥
|
||||
group: 水
|
||||
version: "1.4"
|
||||
updated: "2026-03-12"
|
||||
version: "1.5"
|
||||
updated: "2026-03-14"
|
||||
---
|
||||
|
||||
# Soul创业实验 Skill
|
||||
@@ -21,7 +21,7 @@ updated: "2026-03-12"
|
||||
| 子类 | 触发词示例 | 说明 |
|
||||
|:---|:---|:---|
|
||||
| **写作** | 写Soul文章、写授文章、Soul派对写文章、第9章写文章、写soul场次、soul文章规则 | 按派对 TXT 写第9章单场文章,**先读** `写作/写作规范.md`:人称用「我」不用「房主」、每句空一行、大白话;**6:3:1 内容比例**(60% 核心 / 30% 次要 / 10% 其它);**约 50% 处插入核心干货块**(3~5 条可执行、紧扣主题);**数值与场景必须具体**;**约 20% 处 + 结尾各一句分享句**;联系管理/切片/副业隐晦植入 |
|
||||
| **上传** | Soul文章上传、Soul派对文章、第9章上传、soul上传、写soul文章、文章写好上传 | **仅在你明确说上传/推送时才执行**。上传到小程序;上传后若你要求推送,再同步固定飞书群:发前 6% 正文(**一句一行、行间空一行**)+ 章节海报图(含小程序码),**不发小程序链接**,见 `上传/README.md` 与 `上传/推送逻辑.md` |
|
||||
| **上传** | Soul文章上传、Soul派对文章、第9章上传、soul上传、写soul文章、文章写好上传 | **仅在你明确说上传时才执行**。上传到小程序;**飞书群推送默认不执行**,只有你说「发飞书」「推飞书」「同步飞书群」时才发。推送内容:前 6% 正文(一句一行、行间空一行)+ 海报图,不发小程序链接,见 `上传/README.md` |
|
||||
| **运营报表** | 运营报表、派对填表、派对截图填表发群、派对纪要、106场、107场、本月运营数据 | 派对效果数据→飞书表格→智能纪要→飞书群,见飞书管理下运营报表 Skill |
|
||||
|
||||
执行时:根据用户说的关键词判断是**写作 / 上传 / 运营报表**,再进入对应子类(读本目录下 `写作/` 或 `上传/` 或引用运营报表)。
|
||||
@@ -126,3 +126,4 @@ bash scripts/gitea_sync.sh
|
||||
| 1.2 | 2026-03-18 | 写作规范:6:3:1 内容比例(60% 核心 / 30% 次要 / 10% 其它);约 50% 处插入核心干货块;人称用「我」不用「房主」 |
|
||||
| 1.3 | 2026-03-12 | 新增书稿目录 ↔ Gitea/GitHub 双向同步入口(`scripts/gitea_sync.sh`) |
|
||||
| 1.4 | 2026-03-12 | 明确:Gitea 同步为实时;上传小程序、推送飞书群仅在你明确说时才执行 |
|
||||
| 1.5 | 2026-03-14 | 写作规范:有温度、有人情味、情绪起伏、过渡丝滑;取名不说「随便」,有步骤有章法;格式强制每句空一行、不要挤成一段段 |
|
||||
|
||||
@@ -12,6 +12,21 @@
|
||||
|
||||
---
|
||||
|
||||
## 小程序格式规范(上传前必查)
|
||||
|
||||
上传到小程序的正文**不要用**以下标点,小程序内不好处理:
|
||||
|
||||
| 不用 | 原因 |
|
||||
|:---|:---|
|
||||
| `**` 加粗 | 可能被当成正文星号展示 |
|
||||
| `---` 分割线 | 易错乱 |
|
||||
| `→` 箭头 | 用「到」等中文替代 |
|
||||
| `##` 小标题 | 用「一、二、三」或数字,或纯空行分段 |
|
||||
|
||||
- 每句空一行;小节用空行分段;标题不含章节号(如「9.15」)时,上传命令的 `--title` 用「主题|副标题」即可。
|
||||
|
||||
---
|
||||
|
||||
## 路径与配置
|
||||
|
||||
| 项目 | 值 |
|
||||
@@ -55,9 +70,9 @@ python3 content_upload.py --id 9.xx --title "9.xx 第X场|标题" \
|
||||
|
||||
---
|
||||
|
||||
## 同步飞书群(上传后必做)
|
||||
## 同步飞书群(按需执行)
|
||||
|
||||
上传到小程序后,**同步**推送到固定飞书群:发**前 6% 正文**(一句一行、行间空一行)+ **章节海报图**(含该章节小程序码),**不发小程序链接**。详见 `上传/推送逻辑.md`。
|
||||
**默认不上传飞书群**。上传到小程序后,**只有在你明确说「发飞书」「推飞书」「同步飞书群」等时才执行**。推送内容:**前 6% 正文**(一句一行、行间空一行)+ **章节海报图**(含该章节小程序码),**不发小程序链接**。详见 `上传/推送逻辑.md`。
|
||||
|
||||
在永平项目下执行(`--md` 为**本篇文章**的 md 路径):
|
||||
|
||||
|
||||
@@ -62,7 +62,8 @@
|
||||
|
||||
- 第一人称叙述用「我」,不用「房主」,见第一节
|
||||
- **短句,大白话,口语化**:像平时说话一样写,不书面、不拽词
|
||||
- **每句空一行**:一句写完就换行、再空一行再写下一句,不要好几句挤成一段
|
||||
- **每句空一行(强制)**:一句写完就换行、再空一行再写下一句;**分号也空一行**,分号前后的内容各成一行;**不要多句挤成一段**,每句单独成行、句间空行,段落不要太长
|
||||
- **有温度、有人情味**:写出情绪起伏,开篇先共鸣再给信心;过渡要丝滑、承上启下(如「好,我们从开房说起」「到这儿,房就开好了」);步骤、取名等用有章法、有温度的方式描述,**不说「随便填」「随便聊聊」**,改为「第一步…第二步…」「写你正在做的事就行」「有章法,后面会细说」等
|
||||
- 善用对比、反转;适当自嘲或幽默
|
||||
|
||||
---
|
||||
@@ -92,7 +93,7 @@
|
||||
|
||||
## 十、格式规范(统一)
|
||||
|
||||
- **每句空一行**:每一句话后面换行 + 空一行,再写下一句;不要多句挤在一段
|
||||
- **每句空一行(强制)**:每一句话后面换行 + 空一行,再写下一句;**分号也空一行**,分号前后的内容各成一行;**不要多句挤在一段**,不要挤成一段一段的长段落,保持每句独立成行、句间空行
|
||||
- 段与段之间空行
|
||||
- 对话、细节、观点分行,避免大段堆砌
|
||||
- 用 `---` 做段落分隔(与全书一致)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
> 基于项目 52 个 `.feishu.json` 实际文件 + 6 个脚本验证 + 飞书开放平台官方文档。
|
||||
> **版本:2.1** | **更新:2026-02-22**
|
||||
> 来源:卡若AI 水桥 · 飞书管理
|
||||
> v2.1 新增:表格列宽自动适配 API、表格分割行 2+ 破折号兼容、code/callout 降级保底
|
||||
> v2.2 新增:表格列宽 150~520px、表头/首列加粗、首尾去掉 callout、--no-callouts。v2.1:表格列宽 API、code/callout 降级
|
||||
|
||||
---
|
||||
|
||||
@@ -406,7 +406,8 @@ Body:
|
||||
|
||||
- 对每一列循环调用,pixelSize 按内容自动计算:中文 ≈ 20px/字、ASCII ≈ 9px/字 + 24px 内边距。
|
||||
- 最小 80px,最大 400px。
|
||||
- `feishu_publish_blocks_with_images.py` 中 `_auto_resize_sheet_columns()` 已封装此逻辑,写完单元格自动触发。
|
||||
- **v2.2**:列宽 min 150px、max 520px;表头行+首列自动加粗(`PUT .../styles` appendStyle);sanitize 去掉首尾 callout。
|
||||
- `feishu_publish_blocks_with_images.py` 中 `_auto_resize_sheet_columns` + `_apply_sheet_bold_style` 已封装;`md_to_feishu_json --no-callouts` 将 `>` 转正文。
|
||||
|
||||
**Markdown 表格分割行兼容(v2.1 修复)**:
|
||||
|
||||
@@ -638,7 +639,7 @@ Markdown 表格
|
||||
| 块数 > 50 写入失败 | 单次限制 50 块 | 分批写入,每批 ≤ 50 |
|
||||
| sheet 超 9×9 报错 | 电子表格创建上限 | 改用 TSV 正文(2) 回退 |
|
||||
| 写入串月 | wiki_token 路由错误 | 写前校验文档标题含目标月份 |
|
||||
| 表格列太窄挤压 | 默认列宽约 72px | 写完数据后调用 `PUT dimension_range` 或用 `_auto_resize_sheet_columns()` |
|
||||
| 表格列太窄挤压 | 默认列宽约 72px | v2.2:min 150px max 520px;`_auto_resize_sheet_columns` 自动调用 |
|
||||
| 表格未识别(显示 `|文字|`) | 分割行破折号不足 3 个(`:--`) | 脚本 v2.1 已修复,现接受 2+ 破折号 |
|
||||
| code(14)/callout(19) 写入失败 | API 1770001 | 脚本自动降级为 text(2) 正文块,内容保留 |
|
||||
|
||||
@@ -646,4 +647,4 @@ Markdown 表格
|
||||
|
||||
**版本**:2.1 | **整理**:卡若AI 水桥 | **更新**:2026-02-22
|
||||
**数据来源**:52 个 `.feishu.json` + 6 个脚本 + 飞书开放平台 API 文档
|
||||
**v2.1 变更**:表格分割行接受 2+ 破折号;新增列宽自适应 `dimension_range` API;sanitize_blocks 扩展支持 code/callout;code/callout 写入失败自动降级为 text。
|
||||
**v2.2 变更**:表格列宽 150~520px;表头+首列加粗(`PUT styles`);首尾 callout 去除;`--no-callouts`。**v2.1**:列宽 API、code/callout 降级。
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"access_token": "u-etChap5Od26rxUgaVXv42ulh16H1ghqNN0GaIB40265Z",
|
||||
"refresh_token": "ur-fZNnr2K6F3DHz69kjFmQOGlh3C91ghqVrwGaIMg023gI",
|
||||
"access_token": "u-cuz3ckcRteiVGpnnUtHq59lh16bxghoVogGaFwk027lV",
|
||||
"refresh_token": "ur-fWPrc3KpdblHZapGmPPKLIlh1Azxghijr0GaVw0027lV",
|
||||
"name": "飞书用户",
|
||||
"auth_time": "2026-03-12T22:44:05.347461"
|
||||
"auth_time": "2026-03-14T12:12:52.532017"
|
||||
}
|
||||
@@ -50,8 +50,8 @@ def main():
|
||||
raise SystemExit(f"❌ MD 不存在: {md_path}")
|
||||
json_path.parent.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
# Step 1: 本地转 JSON
|
||||
run(["python3", str(MD2JSON), str(md_path), str(json_path)])
|
||||
# Step 1: 本地转 JSON(--no-callouts 去掉高亮块,表格更清爽)
|
||||
run(["python3", str(MD2JSON), str(md_path), str(json_path), "--no-callouts"])
|
||||
|
||||
# Step 2: 发布(同标题优先更新)
|
||||
cmd = [
|
||||
|
||||
@@ -333,7 +333,7 @@ def _get_elements_content(elements: list) -> str:
|
||||
|
||||
|
||||
def sanitize_blocks(blocks: list) -> list:
|
||||
"""飞书 docx blocks 轻量清洗:去掉空文本/空代码块/空 callout,避免 invalid param。"""
|
||||
"""飞书 docx blocks 轻量清洗:去掉空文本/空代码块/空 callout,去掉首尾 callout,避免 invalid param。"""
|
||||
out = []
|
||||
for b in blocks:
|
||||
if not isinstance(b, dict):
|
||||
@@ -351,6 +351,11 @@ def sanitize_blocks(blocks: list) -> list:
|
||||
if not _get_elements_content(elems).strip():
|
||||
continue
|
||||
out.append(b)
|
||||
# 去掉首尾 callout(表格上下不挤高亮块)
|
||||
while out and isinstance(out[0], dict) and out[0].get("block_type") == 19:
|
||||
out.pop(0)
|
||||
while out and isinstance(out[-1], dict) and out[-1].get("block_type") == 19:
|
||||
out.pop()
|
||||
return out
|
||||
|
||||
|
||||
@@ -394,6 +399,11 @@ def _cell_px_width(text: str) -> int:
|
||||
return w + 24
|
||||
|
||||
|
||||
# 表格列宽:首列 max 400px;第二列及以后(定性/说明等)max 1000px,内容多则更宽
|
||||
SHEET_COL_MIN_PX = 150
|
||||
SHEET_COL_MAX_PX = 1000
|
||||
|
||||
|
||||
def _auto_resize_sheet_columns(
|
||||
headers: dict, spreadsheet_token: str, sheet_id: str, values: list[list[str]]
|
||||
) -> None:
|
||||
@@ -408,9 +418,11 @@ def _auto_resize_sheet_columns(
|
||||
for j in range(cols):
|
||||
max_w = max(
|
||||
(_cell_px_width(row[j]) for row in values if j < len(row)),
|
||||
default=80,
|
||||
default=SHEET_COL_MIN_PX,
|
||||
)
|
||||
width = max(80, min(max_w, 400))
|
||||
# 第二列及以后(定性/说明/做法等)内容多,放宽到 1000px
|
||||
cap = SHEET_COL_MAX_PX if j >= 1 else 380
|
||||
width = max(SHEET_COL_MIN_PX, min(max_w, cap))
|
||||
payload = {
|
||||
"dimension": {
|
||||
"sheetId": sheet_id,
|
||||
@@ -426,6 +438,33 @@ def _auto_resize_sheet_columns(
|
||||
pass
|
||||
|
||||
|
||||
def _apply_sheet_bold_style(
|
||||
headers: dict, spreadsheet_token: str, sheet_id: str, values: list[list[str]]
|
||||
) -> None:
|
||||
"""表头行(0)和首列加粗。调用飞书 Sheets style API。失败静默跳过。"""
|
||||
if not values or not spreadsheet_token or not sheet_id:
|
||||
return
|
||||
rows, cols = len(values), max(len(r) for r in values)
|
||||
if rows <= 0 or cols <= 0:
|
||||
return
|
||||
end_col = _col_letter(cols - 1)
|
||||
url = f"https://open.feishu.cn/open-apis/sheets/v2/spreadsheets/{spreadsheet_token}/styles"
|
||||
try:
|
||||
requests.put(
|
||||
url, headers=headers,
|
||||
json={"appendStyle": {"range": f"{sheet_id}!A1:{end_col}1", "style": {"font": {"bold": True}}}},
|
||||
timeout=10,
|
||||
)
|
||||
if rows > 1:
|
||||
requests.put(
|
||||
url, headers=headers,
|
||||
json={"appendStyle": {"range": f"{sheet_id}!A2:A{rows}", "style": {"font": {"bold": True}}}},
|
||||
timeout=10,
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
def _fill_sheet_block_values(headers: dict, sheet_block_token: str, values: list[list[str]]) -> bool:
|
||||
if not sheet_block_token or "_" not in sheet_block_token or not values:
|
||||
return False
|
||||
@@ -447,8 +486,9 @@ def _fill_sheet_block_values(headers: dict, sheet_block_token: str, values: list
|
||||
if j.get("code") != 0:
|
||||
print(f"⚠️ 表格数据写入失败: {j.get('msg')} range={range_str}")
|
||||
return False
|
||||
# 写完数据后自动适配列宽
|
||||
# 写完数据后自动适配列宽 + 表头/首列加粗
|
||||
_auto_resize_sheet_columns(headers, spreadsheet_token, sheet_id, values)
|
||||
_apply_sheet_bold_style(headers, spreadsheet_token, sheet_id, values)
|
||||
return True
|
||||
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ def _clean_inline_markdown(text: str) -> str:
|
||||
|
||||
# ── 主转换函数 ─────────────────────────────────────────────────────────────────
|
||||
|
||||
def md_to_blocks(md: str, image_paths: list[str] | None = None) -> list:
|
||||
def md_to_blocks(md: str, image_paths: list[str] | None = None, no_callouts: bool = False) -> list:
|
||||
"""将 Markdown 字符串转为飞书 blocks 列表。"""
|
||||
blocks: list[dict] = []
|
||||
image_paths = image_paths or []
|
||||
@@ -242,13 +242,16 @@ def md_to_blocks(md: str, image_paths: list[str] | None = None) -> list:
|
||||
else:
|
||||
first_h1_consumed = True
|
||||
|
||||
# ── 引用 → block_type:19 callout ─────────────────────────────────────
|
||||
# ── 引用 → block_type:19 callout(no_callouts 时转为正文)─────────────────
|
||||
elif stripped.startswith(">"):
|
||||
quote = stripped
|
||||
while quote.startswith(">"):
|
||||
quote = quote[1:].lstrip()
|
||||
quote = _clean_inline_markdown(quote)
|
||||
if quote:
|
||||
if no_callouts:
|
||||
blocks.append(_text(quote))
|
||||
else:
|
||||
blocks.append(_callout(quote))
|
||||
|
||||
# ── 正文、列表 ────────────────────────────────────────────────────────
|
||||
@@ -301,6 +304,7 @@ def main() -> None:
|
||||
ap.add_argument("input", help="Markdown 文件")
|
||||
ap.add_argument("output", help="输出 JSON 文件")
|
||||
ap.add_argument("--images", default="", help="图片路径,逗号分隔(按序对应 ![]())")
|
||||
ap.add_argument("--no-callouts", action="store_true", help="不生成高亮块,将 > 引用转为正文")
|
||||
args = ap.parse_args()
|
||||
|
||||
inp = Path(args.input)
|
||||
@@ -310,7 +314,7 @@ def main() -> None:
|
||||
|
||||
md = inp.read_text(encoding="utf-8")
|
||||
image_paths = [p.strip() for p in args.images.split(",") if p.strip()]
|
||||
blocks = md_to_blocks(md, image_paths)
|
||||
blocks = md_to_blocks(md, image_paths, no_callouts=args.no_callouts)
|
||||
final, img_paths = blocks_to_upload_format(blocks, inp.parent)
|
||||
|
||||
out = {
|
||||
|
||||
@@ -4,8 +4,8 @@ description: 飞书文档 JSON 格式速查、编写、上传与翻译;各 blo
|
||||
triggers: 飞书json、飞书json格式、飞书block、飞书块格式、飞书文档格式、json上传飞书、飞书格式怎么写、block_type、飞书块类型、飞书写入格式、飞书上传json、飞书文档block、飞书高亮块、飞书代码块、飞书待办块、飞书标题块、飞书分割线、飞书callout、飞书多维表格json、飞书列表、飞书表格、飞书分栏、更新飞书JSON格式、飞书列宽、表格列宽
|
||||
owner: 水桥
|
||||
group: 水
|
||||
version: "2.1"
|
||||
updated: "2026-02-22"
|
||||
version: "2.2"
|
||||
updated: "2026-03-14"
|
||||
---
|
||||
|
||||
# 飞书 JSON 格式 Skill
|
||||
@@ -231,26 +231,17 @@ POST drive/v1/medias/upload_all (form-data: file_name, parent_type=docx_image,
|
||||
|
||||
> 最大 9×9,创建后通过 sheets API 写入单元格。
|
||||
|
||||
**表格列宽自动适配(强制执行,写完数据后立刻调用)**:
|
||||
**表格格式规范(v2.2 强制执行)**:
|
||||
|
||||
```bash
|
||||
PUT /sheets/v2/spreadsheets/{spreadsheet_token}/dimension_range
|
||||
```
|
||||
| 规则 | 说明 |
|
||||
|:---|:---|
|
||||
| **列宽** | 首列 max 380px;第二列及以后(定性/说明/做法等)max 1000px,内容多则更宽 |
|
||||
| **表头/首列加粗** | 表头行(0)和首列自动加粗(`PUT .../styles` appendStyle font.bold) |
|
||||
| **首尾无高亮块** | 文档首尾不放置 callout(19);`--no-callouts` 将 `>` 转正文 |
|
||||
| **无来源/原则块** | 文档内不单独放置「分析来源」「卡若原则」等说明块 |
|
||||
|
||||
```json
|
||||
{
|
||||
"dimension": {
|
||||
"sheetId": "<sheet_id>",
|
||||
"majorDimension": "COLUMNS",
|
||||
"startIndex": 0,
|
||||
"endIndex": 1
|
||||
},
|
||||
"dimensionProperties": {"pixelSize": 200}
|
||||
}
|
||||
```
|
||||
|
||||
- 中文字符 ≈ 20px/字,ASCII ≈ 9px/字,加 24px 内边距;最小 80px,最大 400px。
|
||||
- 脚本 `feishu_publish_blocks_with_images.py` 的 `_auto_resize_sheet_columns()` 自动完成此步骤,无需手动调用。
|
||||
- 脚本 `feishu_publish_blocks_with_images.py` 自动完成:`_auto_resize_sheet_columns` + `_apply_sheet_bold_style`。
|
||||
- `feishu_article_unified_publish.py` 默认 `--no-callouts`。
|
||||
|
||||
### 10. 多维表格(block_type: 43)
|
||||
|
||||
|
||||
96
运营中枢/scripts/receivesms_list_10_with_sms.py
Normal file
96
运营中枢/scripts/receivesms_list_10_with_sms.py
Normal file
@@ -0,0 +1,96 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
receivesms.co:获取 10 个可用于注册的临时号码,并输出每个号码最近收到的 1 条短信。
|
||||
"""
|
||||
import re
|
||||
import time
|
||||
import urllib.request
|
||||
|
||||
BASE = "https://www.receivesms.co"
|
||||
|
||||
CONFIGS = [
|
||||
("US", BASE + "/us-phone-numbers/us/", "us-phone-number",
|
||||
re.compile(r'href="/us-phone-number/(\d+)/"[^>]*>.*?<strong>(\+1[\d\s\-]+)</strong>', re.DOTALL)),
|
||||
("CA", BASE + "/canadian-phone-numbers/ca/", "ca-phone-number",
|
||||
re.compile(r'href="/ca-phone-number/(\d+)/"[^>]*>.*?<strong>(\+1[\d\s\-]+)</strong>', re.DOTALL)),
|
||||
("GB", BASE + "/british-phone-numbers/gb/", "gb-phone-number",
|
||||
re.compile(r'href="/gb-phone-number/(\d+)/"[^>]*>.*?<strong>(\+44[\d\s]+)</strong>', re.DOTALL)),
|
||||
]
|
||||
|
||||
|
||||
def fetch(url):
|
||||
req = urllib.request.Request(
|
||||
url, headers={"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)"}
|
||||
)
|
||||
with urllib.request.urlopen(req, timeout=20) as r:
|
||||
return r.read().decode("utf-8", errors="replace")
|
||||
|
||||
|
||||
def parse_list(html, regex):
|
||||
pairs = []
|
||||
for m in regex.finditer(html):
|
||||
mid, num = m.group(1), m.group(2).replace(" ", "").replace("-", "").strip()
|
||||
if num.startswith("+"):
|
||||
pairs.append((mid, num))
|
||||
return pairs
|
||||
|
||||
|
||||
def parse_latest_sms(html):
|
||||
m = re.search(r'<div class="sms">(.*?)</div>', html, re.DOTALL)
|
||||
if not m:
|
||||
return None
|
||||
text = m.group(1).strip()
|
||||
text = re.sub(r"<[^>]+>", "", text)
|
||||
text = text.replace(" ", " ").replace("&", "&").replace("<", "<").replace(">", ">").replace(""", '"')
|
||||
return " ".join(text.split()).strip() or None
|
||||
|
||||
|
||||
def main():
|
||||
want = 10
|
||||
seen = set()
|
||||
results = []
|
||||
print(f"正在从 receivesms.co 拉取 {want} 个号码及其最新短信…", flush=True)
|
||||
for country, list_url, path_prefix, regex in CONFIGS:
|
||||
if len(results) >= want:
|
||||
break
|
||||
try:
|
||||
html = fetch(list_url)
|
||||
pairs = parse_list(html, regex)
|
||||
except Exception as e:
|
||||
print(f" {country} 列表失败: {e}", flush=True)
|
||||
continue
|
||||
for mid, num in pairs[:25]:
|
||||
if len(results) >= want:
|
||||
break
|
||||
if num in seen:
|
||||
continue
|
||||
url = f"{BASE}/{path_prefix}/{mid}/"
|
||||
try:
|
||||
page = fetch(url)
|
||||
except Exception:
|
||||
time.sleep(0.4)
|
||||
continue
|
||||
if 'class="sms"' not in page and 'class="entry-body"' not in page:
|
||||
time.sleep(0.2)
|
||||
continue
|
||||
sms = parse_latest_sms(page)
|
||||
seen.add(num)
|
||||
results.append((country, num, sms or "(无)", url))
|
||||
print(f" [{len(results)}/{want}] {country} {num}", flush=True)
|
||||
time.sleep(0.35)
|
||||
print("\n" + "=" * 70)
|
||||
print(f"共 {len(results)} 个可用号码 · 每个最新 1 条短信")
|
||||
print("=" * 70)
|
||||
for i, (country, num, sms, url) in enumerate(results, 1):
|
||||
sms_short = (sms[:80] + "…") if len(sms) > 80 else sms
|
||||
print(f"\n{i}. {country} {num}")
|
||||
print(f" 收件页: {url}")
|
||||
print(f" 最新短信: {sms_short}")
|
||||
print("\n" + "=" * 70)
|
||||
print("使用说明:打开对应收件页即可查看/刷新短信,可用于注册时填入号码并在此查看验证码。")
|
||||
print("=" * 70)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -353,3 +353,4 @@
|
||||
| 2026-03-13 23:26:44 | 🔄 卡若AI 同步 2026-03-13 23:26 | 更新:运营中枢工作台 | 排除 >20MB: 11 个 |
|
||||
| 2026-03-13 23:54:53 | 🔄 卡若AI 同步 2026-03-13 23:54 | 更新:运营中枢工作台 | 排除 >20MB: 11 个 |
|
||||
| 2026-03-14 09:31:21 | 🔄 卡若AI 同步 2026-03-14 09:31 | 更新:水溪整理归档、运营中枢工作台 | 排除 >20MB: 11 个 |
|
||||
| 2026-03-14 10:36:14 | 🔄 卡若AI 同步 2026-03-14 10:36 | 更新:水桥平台对接、水溪整理归档、火炬、运营中枢工作台 | 排除 >20MB: 11 个 |
|
||||
|
||||
@@ -54,7 +54,8 @@
|
||||
"member": "金仓",
|
||||
"group": "金",
|
||||
"triggers": "宝塔、部署、SSL",
|
||||
"oneLiner": "宝塔面板、域名、证书"
|
||||
"oneLiner": "宝塔面板、域名、证书",
|
||||
"updated": "2026-03-14T10:17:47.371Z"
|
||||
},
|
||||
{
|
||||
"id": "G08",
|
||||
@@ -167,7 +168,8 @@
|
||||
"member": "水溪",
|
||||
"group": "水",
|
||||
"triggers": "整理文件、外置硬盘",
|
||||
"oneLiner": "文件分类、去重、归档"
|
||||
"oneLiner": "文件分类、去重、归档",
|
||||
"updated": "2026-03-14T10:10:54.709Z"
|
||||
},
|
||||
{
|
||||
"id": "W02",
|
||||
@@ -175,7 +177,8 @@
|
||||
"member": "水溪",
|
||||
"group": "水",
|
||||
"triggers": "PDF转Markdown",
|
||||
"oneLiner": "PDF/Word 转结构化 Markdown"
|
||||
"oneLiner": "PDF/Word 转结构化 Markdown",
|
||||
"updated": "2026-03-14T10:10:55.343Z"
|
||||
},
|
||||
{
|
||||
"id": "W03",
|
||||
|
||||
@@ -356,3 +356,4 @@
|
||||
| 2026-03-13 23:26:44 | 成功 | 成功 | 🔄 卡若AI 同步 2026-03-13 23:26 | 更新:运营中枢工作台 | 排除 >20MB: 11 个 | [仓库](http://open.quwanzhi.com:3000/fnvtk/karuo-ai) [百科](http://open.quwanzhi.com:3000/fnvtk/karuo-ai/wiki) |
|
||||
| 2026-03-13 23:54:53 | 成功 | 成功 | 🔄 卡若AI 同步 2026-03-13 23:54 | 更新:运营中枢工作台 | 排除 >20MB: 11 个 | [仓库](http://open.quwanzhi.com:3000/fnvtk/karuo-ai) [百科](http://open.quwanzhi.com:3000/fnvtk/karuo-ai/wiki) |
|
||||
| 2026-03-14 09:31:21 | 成功 | 成功 | 🔄 卡若AI 同步 2026-03-14 09:31 | 更新:水溪整理归档、运营中枢工作台 | 排除 >20MB: 11 个 | [仓库](http://open.quwanzhi.com:3000/fnvtk/karuo-ai) [百科](http://open.quwanzhi.com:3000/fnvtk/karuo-ai/wiki) |
|
||||
| 2026-03-14 10:36:14 | 成功 | 成功 | 🔄 卡若AI 同步 2026-03-14 10:36 | 更新:水桥平台对接、水溪整理归档、火炬、运营中枢工作台 | 排除 >20MB: 11 个 | [仓库](http://open.quwanzhi.com:3000/fnvtk/karuo-ai) [百科](http://open.quwanzhi.com:3000/fnvtk/karuo-ai/wiki) |
|
||||
|
||||
Reference in New Issue
Block a user