← 返回
内容创作

X Mobile Longshot / X 真机感长截图导出

Render X (Twitter) posts, long articles, and mobile reading pages into mobile-style long screenshots and optional single-page PDFs using Playwright. Use when...
使用 Playwright 渲染 X(Twitter)帖子、长文及移动阅读页为移动端长截图,可选生成单页 PDF。
spyfree
内容创作 clawhub v1.0.1 1 版本 100000 Key: 无需
★ 0
Stars
📥 597
下载
💾 12
安装
1
版本
#latest

概述

X Mobile Longshot

Render X links into phone-like dark-mode long screenshots, then optionally wrap the image into a single-page PDF.

Quick start

Use the bundled script:

node skills/x-mobile-longshot/scripts/render_x_longshot.js \
  --url 'https://x.com/i/status/2030475950752710891' \
  --out-png 'outputs/x_render/example.png' \
  --out-pdf 'outputs/x_render/example.pdf'

If the user only wants the PNG:

node skills/x-mobile-longshot/scripts/render_x_longshot.js \
  --url 'https://x.com/i/status/2030475950752710891' \
  --out-png 'outputs/x_render/example.png' \
  --no-pdf

Workflow

  1. Use Playwright mobile emulation, dark mode, and a phone device preset.
  2. Open the X URL and wait for the page to settle.
  3. Dismiss top modal/app-open prompts with DOM-side clicks when present.
  4. Remove common fixed/sticky overlays by matching known X CTA text.
  5. Capture one full-page PNG.
  6. Re-open the page, repeat cleanup, capture one clean viewport image.
  7. Replace the top portion of the long PNG with the clean viewport image to reduce popup contamination.
  8. Convert the PNG into a single-page PDF when requested.

Defaults

  • Device: iPhone 14 Pro Max
  • Color scheme: dark
  • Locale: zh-CN
  • Timezone: Asia/Shanghai
  • Top replacement height: 1450px

Tuning

Useful flags:

  • --device 'iPhone 14 Pro Max' to change the Playwright device preset
  • --wait-ms 6000 to wait longer for slow pages
  • --top-fix-px 1700 to replace more of the top area when the popup intrudes deeper
  • --no-pdf to skip PDF creation

Quality bar

Prefer this skill when the user wants:

  • phone-like visual presentation
  • dark-mode X reading output
  • archival PNG + PDF delivery
  • a result that feels closer to a real screenshot than browser print output

Do not overclaim native-app fidelity. This is a browser-rendered mobile capture pipeline with cleanup, not a real iPhone App Store build of X.

Troubleshooting

If the output still contains overlays or sticky bars:

  1. Re-run with higher --wait-ms.
  2. Increase --top-fix-px.
  3. Read references/notes.md and update the overlay text patterns in scripts/render_x_longshot.js.
  4. If X changed its DOM substantially, migrate to segmented capture + stitching as the next iteration.

Resources

  • scripts/render_x_longshot.js: main renderer
  • references/notes.md: v1 design notes, limits, and iteration guidance

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-03-19 21:28 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

AdMapix

fly0pants
广告情报与应用数据分析助手,支持搜索广告素材、分析应用排名、下载量、收入及市场洞察,用于广告素材和竞品分析。
★ 295 📥 136,428
data-analysis

US Stock Valuation Model - Value Investing Framework / 美股估值模型-价值投资框架

spyfree
结构化双语框架,从质量、护城河、管理层、估值和风险维度评估美股,辅助买入/观察/回避决策及持续监控。
★ 2 📥 3,245
content-creation

Baidu Wenku AIPPT

ide-rea
使用百度文库 AI 智能生成 PPT,自动根据内容选择模板。
★ 66 📥 46,142